/* ========================================
   NEXTCODEZ FOOTER STYLES - MOBILE FIXED
   ======================================== */

/* Toast Notification Styles - MOBILE OPTIMIZED */
.footer-toast {
    position: fixed;
    top: 20px;
    right: 20px;
    background-color: #000;
    color: #fff;
    padding: 16px 20px;
    border-radius: 12px;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.15);
    z-index: 99999; /* Increased z-index */
    opacity: 0;
    transform: translateX(400px);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    max-width: 350px;
    pointer-events: none; /* Don't block touches when hidden */
}

.footer-toast.show {
    opacity: 1;
    transform: translateX(0);
    pointer-events: auto; /* Enable touches when visible */
}

.footer-toast-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 16px;
}

.footer-toast-title {
    font-size: 15px;
    font-weight: 500;
    margin: 0;
    line-height: 1.4;
}

.footer-toast-button {
    background-color: #fff;
    color: #000;
    border: none;
    padding: 8px 16px;
    border-radius: 6px;
    cursor: pointer;
    font-weight: 600;
    font-size: 13px;
    transition: all 0.2s ease;
    white-space: nowrap;
    flex-shrink: 0;
    -webkit-tap-highlight-color: transparent; /* Remove tap highlight on mobile */
}

.footer-toast-button:hover,
.footer-toast-button:active {
    background-color: #f0f0f0;
}

/* Footer Container */
.nextcodez-footer-container {
    position: relative;
    background-color: #ffffff;
    color: #000;
    padding: 3.5rem 0 2rem;
    margin-top: 4rem;
}

.footer-content-wrapper {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 2rem;
}

/* Grid Layout */
.footer-grid {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    flex-wrap: wrap;
    gap: 3rem;
    margin-bottom: 3rem;
}

/* Newsletter Section - MOBILE INPUT FIXED */
.footer-newsletter-section {
    flex: 1;
    min-width: 280px;
    max-width: 600px;
}

.footer-main-heading {
    font-size: clamp(1.75rem, 4vw, 2.5rem);
    font-weight: 600;
    margin-bottom: 1.5rem;
    line-height: 1.2;
    color: #000;
}

.footer-newsletter-wrapper {
    padding-top: 0.5rem;
}

.footer-newsletter-text {
    font-size: clamp(1.125rem, 2vw, 1.5rem);
    padding: 1rem 0;
    color: #333;
    margin: 0;
}

.footer-newsletter-input-wrapper {
    position: relative;
    background-color: #000;
    display: flex;
    align-items: center;
    border: 2px solid #000;
    border-radius: 50px;
    overflow: hidden;
    transition: all 0.3s ease;
    max-width: 500px;
    -webkit-tap-highlight-color: transparent;
}

.footer-newsletter-input-wrapper:hover {
    background-color: transparent;
}

.footer-newsletter-input-wrapper:hover .footer-newsletter-input {
    color: #000;
}

.footer-newsletter-input-wrapper:focus-within {
    border-color: #3E7AEE;
    box-shadow: 0 0 0 3px rgba(62, 122, 238, 0.1);
    background-color: transparent;
}

.footer-newsletter-input-wrapper:focus-within .footer-newsletter-input {
    color: #000;
}

.footer-newsletter-form {
    position: relative;
    z-index: 2;
    display: flex;
    width: 100%;
    height: 100%;
}

.footer-newsletter-input {
    border: none;
    background-color: transparent;
    padding: 0.875rem 1.5rem;
    color: #fff;
    font-size: clamp(0.875rem, 1.5vw, 1.125rem);
    outline: none;
    width: 100%;
    flex: 1;
    -webkit-appearance: none; /* Remove iOS styling */
    -moz-appearance: none;
    appearance: none;
    font-family: inherit;
    line-height: 1.5;
}

.footer-newsletter-input::placeholder {
    color: #999;
}

.footer-newsletter-input-wrapper:hover .footer-newsletter-input::placeholder {
    color: #666;
}

.footer-newsletter-input-wrapper:focus-within .footer-newsletter-input::placeholder {
    color: #666;
}

.footer-newsletter-button {
    cursor: pointer;
    width: 56px;
    min-width: 50px;
    background-color: #ffffff;
    border: none;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background-color 0.2s ease;
    flex-shrink: 0;
    -webkit-tap-highlight-color: transparent;
    align-self: stretch;
}

.footer-newsletter-button svg {
    width: 18px;
    height: 15px;
    display: block;
}

/* Footer Bottom */
.footer-bottom-section {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.5rem 0 0.5rem;
    border-top: 1px solid #e0e0e0;
    flex-wrap: wrap;
    gap: 1rem;
}

.footer-copyright {
    font-weight: 500;
    color: #000000;
    font-size: clamp(0.875rem, 1vw, 1rem);
}

/* ========================================
   RESPONSIVE STYLES - MOBILE FIXED
   ======================================== */

/* Tablet (768px and below) */
@media (max-width: 768px) {
    .nextcodez-footer-container {
        padding: 2.5rem 0 1.5rem;
        margin-top: 3rem;
    }

    .footer-content-wrapper {
        padding: 0 1.5rem;
    }

    .footer-grid {
        flex-direction: column;
        gap: 2.5rem;
        margin-bottom: 2rem;
    }

    .footer-newsletter-section {
        max-width: 100%;
    }

    .footer-main-heading {
        margin-bottom: 1rem;
    }

    .footer-newsletter-input-wrapper {
        max-width: 100%;
    }

    /* MOBILE TOAST FIX */
    .footer-toast {
        left: 50%;
        right: auto;
        top: 20px;
        transform: translate(-50%, -100px);
        max-width: calc(100% - 40px);
        width: auto;
        min-width: 280px;
    }

    .footer-toast.show {
        transform: translate(-50%, 0);
    }

    .footer-bottom-section {
        flex-direction: column;
        text-align: center;
        gap: 0.75rem;
        padding-top: 1rem;
    }
}

/* Mobile (480px and below) */
@media (max-width: 480px) {
    .nextcodez-footer-container {
        padding: 2rem 0 1.5rem;
        margin-top: 2rem;
    }

    .footer-content-wrapper {
        padding: 0 1rem;
    }

    .footer-grid {
        gap: 2rem;
        margin-bottom: 1.5rem;
    }

    .footer-newsletter-wrapper {
        padding-top: 0.25rem;
    }

    .footer-newsletter-text {
        padding: 0.75rem 0;
    }

    /* MOBILE INPUT FIX */
    .footer-newsletter-input {
        padding: 1rem 1.25rem; /* Increased padding for better touch */
        font-size: 16px; /* Prevents zoom on iOS */
        min-height: 48px; /* Better touch target */
    }

    .footer-newsletter-button {
        width: 48px;
        height: 48px;
        min-width: 48px;
        min-height: 48px; /* Better touch target */
    }

    .footer-newsletter-input-wrapper {
        min-height: 52px;
    }

    /* MOBILE TOAST FIX */
    .footer-toast {
        top: 15px;
        max-width: calc(100% - 30px);
        min-width: 260px;
        padding: 14px 18px;
    }

    .footer-toast-content {
        gap: 12px;
    }

    .footer-toast-title {
        font-size: 14px;
    }

    .footer-toast-button {
        padding: 7px 14px;
        font-size: 12px;
        min-height: 32px; /* Better touch target */
    }

    .footer-bottom-section {
        padding-top: 1rem;
    }
}

/* Extra small devices (360px and below) */
@media (max-width: 360px) {
    .footer-content-wrapper {
        padding: 0 0.75rem;
    }

    .footer-newsletter-input {
        padding: 0.875rem 1rem;
        font-size: 16px; /* Keep 16px to prevent zoom */
    }

    .footer-newsletter-button {
        width: 44px;
        height: 44px;
        min-width: 44px;
    }

    .footer-newsletter-button svg {
        width: 16px;
        height: 14px;
    }

    .footer-toast {
        max-width: calc(100% - 20px);
        min-width: 240px;
    }
}

/* High resolution displays */
@media (min-width: 1400px) {
    .footer-content-wrapper {
        max-width: 1400px;
    }

    .footer-main-heading {
        font-size: 2.75rem;
    }
}

/* iOS specific fixes */
@supports (-webkit-touch-callout: none) {
    .footer-newsletter-input {
        font-size: 16px !important; /* Prevent zoom on focus */
    }
}

/* Print styles */
@media print {
    .footer-toast {
        display: none !important;
    }

    .nextcodez-footer-container {
        background-color: #fff;
        padding: 1rem 0;
        margin-top: 2rem;
    }

    .footer-newsletter-wrapper {
        display: none;
    }
}