/**
 * MG Red Line - Dynamic Components CSS
 *
 * Styles for components that were previously injected via JavaScript.
 * These styles are now properly cached and rendered without JS dependency.
 *
 * @package MG_Red_Line
 */

/* ==========================================================================
   MOBILE MENU
   ========================================================================== */

.mgredline-mobile-menu {
    position: fixed;
    top: 0;
    right: -100%;
    width: 80%;
    max-width: 400px;
    height: 100vh;
    background: var(--white);
    z-index: 9999;
    transition: var(--transition);
    box-shadow: -5px 0 15px rgba(0, 0, 0, 0.1);
}

.mgredline-mobile-menu.active {
    right: 0;
}

.mgredline-mobile-nav ul {
    flex-direction: column;
    padding: 20px;
}

.mgredline-mobile-nav a {
    color: var(--text-color);
    padding: 15px 0;
    border-bottom: 1px solid var(--medium-gray);
}

/* Mobile Menu Toggle Button */
.mobile-menu-toggle {
    display: none;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    width: 30px;
    height: 30px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 0;
}

.mobile-menu-toggle span {
    display: block;
    width: 25px;
    height: 3px;
    background: var(--white);
    margin: 3px 0;
    transition: 0.3s;
    border-radius: 2px;
}

.mobile-menu-toggle.active span:nth-child(1) {
    transform: rotate(-45deg) translate(-5px, 6px);
}

.mobile-menu-toggle.active span:nth-child(2) {
    opacity: 0;
}

.mobile-menu-toggle.active span:nth-child(3) {
    transform: rotate(45deg) translate(-5px, -6px);
}

/* ==========================================================================
   LOADING OVERLAY
   ========================================================================== */

.mgredline-loading {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    z-index: 99999;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transition: var(--transition);
}

.mgredline-loading.active {
    opacity: 1;
    visibility: visible;
}

.loading-spinner {
    text-align: center;
    color: var(--white);
}

.spinner {
    width: 40px;
    height: 40px;
    border: 4px solid rgba(255, 255, 255, 0.3);
    border-top: 4px solid var(--primary-color);
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin: 0 auto 15px;
}

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

/* ==========================================================================
   NOTIFICATIONS
   ========================================================================== */

.mgredline-notifications-container {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 99999;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.mgredline-notification {
    background: var(--white);
    border: 2px solid var(--dark-color);
    border-left: 6px solid var(--primary-color);
    border-radius: var(--border-radius);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.2);
    color: var(--dark-color);
    font-family: var(--font-primary);
    font-size: 1rem;
    padding: 20px 50px 20px 20px;
    max-width: 400px;
    display: flex;
    align-items: center;
    gap: 15px;
    transform: translateX(100%);
    transition: transform 0.4s ease, opacity 0.3s ease;
    position: relative;
}

.mgredline-notification.visible {
    transform: translateX(0);
}

/* Success Notification */
.mgredline-notification.success {
    border-left-color: var(--success-color);
}

.mgredline-notification.success::before {
    content: '\2713';
    background: var(--success-color);
    color: var(--white);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    font-size: 12px;
    width: 24px;
    height: 24px;
    flex-shrink: 0;
    box-shadow: 0 2px 8px rgba(40, 167, 69, 0.3);
}

/* Error Notification */
.mgredline-notification.error {
    border-left-color: var(--danger-color);
    background: #fef2f2;
}

.mgredline-notification.error::before {
    content: '!';
    background: var(--danger-color);
    color: var(--white);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    font-size: 12px;
    width: 24px;
    height: 24px;
    flex-shrink: 0;
}

/* Info Notification */
.mgredline-notification.info::before {
    content: 'i';
    background: var(--info-color);
    color: var(--white);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    font-size: 12px;
    width: 24px;
    height: 24px;
    flex-shrink: 0;
}

.notification-message {
    flex: 1;
    color: var(--dark-color);
    font-weight: 500;
}

.notification-close {
    position: absolute;
    top: 10px;
    right: 10px;
    background: transparent;
    border: none;
    color: var(--secondary-color);
    cursor: pointer;
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
    font-weight: bold;
    line-height: 1;
    transition: color 0.2s ease;
}

.notification-close:hover {
    color: var(--primary-color);
}

/* ==========================================================================
   SEARCH FORM
   ========================================================================== */

.mgredline-search-form {
    position: absolute;
    top: 100%;
    right: 0;
    background: var(--white);
    padding: 20px;
    border-radius: var(--border-radius);
    box-shadow: var(--box-shadow);
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: var(--transition);
    min-width: 300px;
    z-index: 1001;
}

.mgredline-search-form.active {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.mgredline-search-form form {
    display: flex;
    gap: 10px;
}

.mgredline-search-form input[type="search"] {
    flex: 1;
    padding: 12px 15px;
    border: 2px solid var(--medium-gray);
    border-radius: var(--border-radius);
    font-size: 1rem;
    outline: none;
    transition: border-color 0.3s ease;
}

.mgredline-search-form input[type="search"]:focus {
    border-color: var(--primary-color);
}

.mgredline-search-form button {
    background: var(--primary-color);
    color: var(--white);
    border: none;
    padding: 12px 15px;
    border-radius: var(--border-radius);
    cursor: pointer;
    transition: background-color 0.3s ease;
    font-size: 1rem;
}

.mgredline-search-form button:hover {
    background: var(--primary-color-dark);
}

/* ==========================================================================
   HEADER EFFECTS
   ========================================================================== */

.site-header.scrolled {
    background: rgba(26, 26, 26, 0.95);
    backdrop-filter: blur(10px);
}

.site-header.header-hidden {
    transform: translateY(-100%);
}

/* ==========================================================================
   ANIMATIONS
   ========================================================================== */

@keyframes rippleAnimation {
    to {
        transform: scale(4);
        opacity: 0;
    }
}

/* Animation triggers for features section */
.loaded .mgredline-features-header-enhanced {
    opacity: 1;
    transform: translateY(0);
}

.features-loaded .mgredline-feature-item-enhanced {
    opacity: 1;
    transform: translateY(0);
}

/* ==========================================================================
   RESPONSIVE - TABLET & MOBILE
   ========================================================================== */

@media (max-width: 768px) {
    .mobile-menu-toggle {
        display: flex;
    }

    .main-navigation {
        display: none;
    }

    .cookie-content {
        flex-direction: column;
        text-align: center;
    }

    .mgredline-search-form {
        width: calc(100vw - 30px);
        right: -10px;
        min-width: auto;
    }

    .mgredline-notifications-container {
        right: 15px;
        left: 15px;
    }

    .mgredline-notification {
        max-width: none;
    }
}

@media (max-width: 480px) {
    .mgredline-search-form {
        width: calc(100vw - 20px);
        right: -5px;
    }
}

/* ==========================================================================
   ACCESSIBILITY - HIGH CONTRAST & REDUCED MOTION
   ========================================================================== */

@media (prefers-contrast: high) {
    .mgredline-search-form {
        border: 2px solid var(--dark-color);
    }
}

@media (prefers-reduced-motion: reduce) {
    .mgredline-search-form {
        transition: none !important;
    }
}
