/**
 * Reusable Components - Buttons, Forms, Modals, etc.
 */

/* Page Loader */
.loader-wrapper {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: var(--light-color);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 9999;
    transition: opacity 0.5s ease;
}

.loader {
    position: relative;
    width: 80px;
    height: 80px;
}

.velox-logo-loader {
    width: 60px;
    height: 60px;
    position: relative;
    animation: veloxSpin 1.5s ease-in-out infinite;
    left: 10px;
    top: 10px;
}

.velox-logo-loader::before {
    content: 'V';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-size: 2rem;
    font-weight: 900;
    color: var(--primary-color);
    font-family: 'Oswald', sans-serif;
}

.velox-logo-loader::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border: 3px solid transparent;
    border-top: 3px solid var(--primary-color);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes veloxSpin {
    0%, 100% { 
        transform: scale(1) rotate(0deg); 
    }
    50% { 
        transform: scale(1.1) rotate(180deg); 
    }
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Page Transition Loader */
.page-transition-loader {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.9);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.page-transition-loader .loader-content {
    text-align: center;
    color: white;
}

.page-transition-loader .velox-logo-loader {
    width: 60px;
    height: 60px;
    margin: 0 auto 20px;
    border: 3px solid rgba(255, 255, 255, 0.3);
    border-top: 3px solid var(--accent-color);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

.page-transition-loader p {
    font-size: 1.1rem;
    margin: 0;
    opacity: 0.8;
}

/* Buttons */
.btn {
    font-weight: 700;
    padding: 1rem 2rem;
    border-radius: 0;
    transition: var(--transition);
    position: relative;
    overflow: hidden;
    z-index: 1;
    text-transform: uppercase;
    letter-spacing: 1px;
    font-size: 0.875rem;
    border: 2px solid transparent;
    min-height: 44px;
    -webkit-tap-highlight-color: rgba(255, 0, 0, 0.3);
    cursor: pointer;
}

.btn-primary {
    background-color: var(--primary-color);
    border-color: var(--primary-color);
    color: var(--light-color);
}

.btn-primary:hover,
.btn-primary:focus {
    background-color: var(--light-color);
    border-color: var(--primary-color);
    color: var(--primary-color);
    box-shadow: var(--shadow-md);
}

.btn-outline-white {
    color: var(--light-color);
    border-color: var(--light-color);
    background-color: transparent;
}

.btn-outline-white:hover,
.btn-outline-white:focus {
    background-color: var(--light-color);
    color: var(--primary-color);
    box-shadow: var(--shadow-md);
}

.btn-glow {
    box-shadow: 0 0 30px rgba(0, 0, 0, 0.3);
}

.btn-glow:hover {
    box-shadow: 0 0 40px rgba(0, 0, 0, 0.5);
}

.btn-lg {
    padding: 1.25rem 2.5rem;
    font-size: 1rem;
}

/* Back to Top Button */
.back-to-top {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 50px;
    height: 50px;
    background-color: var(--primary-color);
    color: var(--light-color);
    border: none;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    cursor: pointer;
    opacity: 0;
    visibility: hidden;
    transition: var(--transition);
    z-index: 1000;
}

.back-to-top.active {
    opacity: 1;
    visibility: visible;
}

.back-to-top:hover {
    background-color: var(--light-color);
    color: var(--primary-color);
    transform: translateY(-3px);
    box-shadow: var(--shadow-md);
}

/* Toast Notifications */
.velox-toast {
    position: fixed;
    top: 20px;
    right: 20px;
    background: white;
    border-radius: 8px;
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
    padding: 1rem 1.25rem;
    z-index: 9999;
    opacity: 0;
    transform: translateX(100%);
    transition: all 0.3s ease;
    border-left: 4px solid;
}

.velox-toast.show {
    opacity: 1;
    transform: translateX(0);
}

.velox-toast.toast-success {
    border-left-color: #28a745;
}

.velox-toast.toast-error {
    border-left-color: #dc3545;
}

.toast-content {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.toast-content i {
    font-size: 1.1rem;
}

.toast-success .toast-content i {
    color: #28a745;
}

.toast-error .toast-content i {
    color: #dc3545;
}

.toast-content span {
    font-weight: 500;
    color: var(--dark-color);
    font-size: 0.9rem;
}

/* Toast Notifications */
.velox-toast {
    position: fixed;
    top: 20px;
    right: 20px;
    background: white;
    border-radius: 8px;
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
    padding: 1rem 1.25rem;
    z-index: 9999;
    opacity: 0;
    transform: translateX(100%);
    transition: all 0.3s ease;
    border-left: 4px solid;
}

.velox-toast.show {
    opacity: 1;
    transform: translateX(0);
}

.velox-toast.toast-success {
    border-left-color: #28a745;
}

.velox-toast.toast-error {
    border-left-color: #dc3545;
}

.toast-content {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.toast-content i {
    font-size: 1.1rem;
}

.toast-success .toast-content i {
    color: #28a745;
}

.toast-error .toast-content i {
    color: #dc3545;
}

.toast-content span {
    font-weight: 500;
    color: var(--dark-color);
    font-size: 0.9rem;
}

/* Section Titles */
.section-title {
    font-size: 3rem;
    margin-bottom: 1rem;
    position: relative;
    color: var(--dark-color);
    font-weight: 900;
}

.section-subtitle {
    color: var(--text-light);
    font-size: 1.1rem;
    max-width: 700px;
    margin: 0 auto;
    font-weight: 400;
}

/* Responsive Adjustments */
@media (max-width: 1200px) {
    .section-title {
        font-size: 2.5rem;
    }
}

@media (max-width: 768px) {
    .section-title {
        font-size: 2rem;
    }
    
    .btn {
        padding: 0.75rem 1.5rem;
        font-size: 0.8rem;
    }
    
    .btn-lg {
        padding: 1rem 2rem;
        font-size: 0.9rem;
    }
    
    .velox-toast {
        right: 10px;
        left: 10px;
        transform: translateY(-100%);
    }
    
    .velox-toast.show {
        transform: translateY(0);
    }
}