/**
 * SEO Scan Form Enhanced Styling
 * Ultra-modern UI/UX for diensten-online-zichtbaarheid page
 * Mobile-first, accessible, conversion-optimized
 *
 * @package Clevertech_Astra_Child
 * @version 1.0.0
 */

/* ===== Value Props Grid - Enhanced Design ===== */
#gratis-seo-scan .wp-block-columns:first-of-type {
    display: grid;
    grid-template-columns: 1fr;
    gap: 20px;
    margin-bottom: 40px;
}

#gratis-seo-scan .wp-block-columns:first-of-type .wp-block-column {
    background: linear-gradient(135deg, #f8f9fa 0%, #ffffff 100%);
    border: 2px solid var(--border-color);
    border-radius: 12px;
    padding: 24px;
    display: flex;
    align-items: center;
    gap: 16px;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
}

#gratis-seo-scan .wp-block-columns:first-of-type .wp-block-column:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.08);
    border-color: var(--accent-color);
}

/* Checkmark icon styling */
#gratis-seo-scan .wp-block-columns:first-of-type .wp-block-column > div:first-child {
    width: 48px;
    height: 48px;
    min-width: 48px;
    background: linear-gradient(135deg, var(--success-color) 0%, #2ecc71 100%);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    color: white;
    font-weight: 700;
    box-shadow: 0 4px 12px rgba(39, 174, 96, 0.25);
}

/* Value prop text */
#gratis-seo-scan .wp-block-columns:first-of-type .wp-block-column p {
    margin: 0;
    line-height: 1.5;
}

#gratis-seo-scan .wp-block-columns:first-of-type .wp-block-column p strong {
    display: block;
    color: var(--text-primary);
    font-size: 16px;
    font-weight: 700;
    margin-bottom: 4px;
}

#gratis-seo-scan .wp-block-columns:first-of-type .wp-block-column p {
    color: var(--text-secondary);
    font-size: 14px;
}

/* Tablet: 2 columns */
@media (min-width: 768px) {
    #gratis-seo-scan .wp-block-columns:first-of-type {
        grid-template-columns: repeat(2, 1fr);
        gap: 24px;
    }
}

/* Desktop: 3 columns */
@media (min-width: 1024px) {
    #gratis-seo-scan .wp-block-columns:first-of-type {
        grid-template-columns: repeat(3, 1fr);
        gap: 30px;
    }
}

/* ===== SEO Scan Form Section ===== */
#gratis-seo-scan .wpcf7-form {
    background: var(--background-white);
    padding: 40px;
    border-radius: 16px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.08);
    border: 1px solid var(--border-color);
    max-width: 650px;
    margin: 0 auto;
}

/* ===== Form Labels ===== */
#gratis-seo-scan .wpcf7-form label {
    display: block;
    margin-bottom: 10px;
    font-weight: 600;
    color: var(--text-primary);
    font-size: 15px;
    letter-spacing: 0.3px;
}

/* ===== Input Field Container ===== */
#gratis-seo-scan .wpcf7-form p {
    margin-bottom: 24px;
    position: relative;
}

/* ===== Enhanced Input Styling with Icons ===== */
#gratis-seo-scan .wpcf7-form input[type="text"],
#gratis-seo-scan .wpcf7-form input[type="email"],
#gratis-seo-scan .wpcf7-form input[type="tel"],
#gratis-seo-scan .wpcf7-form input[type="url"],
#gratis-seo-scan .wpcf7-form textarea {
    width: 100%;
    padding: 16px 20px;
    padding-left: 20px;
    border: 2px solid #E1E8ED;
    border-radius: 12px;
    font-size: 16px;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    background: var(--background-light);
    box-sizing: border-box;
    font-family: 'Inter', sans-serif;
    color: var(--text-primary);
}

/* Input placeholders */
#gratis-seo-scan .wpcf7-form input::placeholder,
#gratis-seo-scan .wpcf7-form textarea::placeholder {
    color: #95A5A6;
    opacity: 1;
}

/* Focus states with better visual feedback */
#gratis-seo-scan .wpcf7-form input[type="text"]:focus,
#gratis-seo-scan .wpcf7-form input[type="email"]:focus,
#gratis-seo-scan .wpcf7-form input[type="tel"]:focus,
#gratis-seo-scan .wpcf7-form input[type="url"]:focus,
#gratis-seo-scan .wpcf7-form textarea:focus {
    outline: none;
    border-color: var(--accent-color);
    background: var(--background-white);
    box-shadow: 0 0 0 4px rgba(243, 156, 18, 0.12);
    transform: translateY(-1px);
}

/* Valid input state */
#gratis-seo-scan .wpcf7-form input:valid:not(:placeholder-shown) {
    border-color: var(--success-color);
    background: var(--background-white);
}

/* Invalid input state */
#gratis-seo-scan .wpcf7-form input:invalid:not(:focus):not(:placeholder-shown) {
    border-color: var(--secondary-color);
}

/* ===== Textarea Enhancements ===== */
#gratis-seo-scan .wpcf7-form textarea {
    min-height: 140px;
    resize: vertical;
    line-height: 1.6;
    font-family: inherit;
}

/* ===== Checkbox Styling - Visible & Accessible ===== */
#gratis-seo-scan .wpcf7-form .wpcf7-list-item {
    margin: 0;
    display: flex;
    align-items: flex-start;
    gap: 12px;
    padding: 12px 0;
}

#gratis-seo-scan .wpcf7-form input[type="checkbox"] {
    width: 24px;
    height: 24px;
    min-width: 24px;
    margin: 0;
    cursor: pointer;
    accent-color: var(--accent-color);
    border: 2px solid var(--border-color);
    border-radius: 6px;
}

#gratis-seo-scan .wpcf7-form .wpcf7-list-item-label {
    cursor: pointer;
    font-size: 15px;
    line-height: 1.6;
    color: var(--text-secondary);
    font-weight: 400;
    user-select: none;
    margin: 0;
    flex: 1;
}

/* Privacy link styling */
#gratis-seo-scan .wpcf7-form .wpcf7-list-item-label a {
    color: var(--info-color);
    text-decoration: underline;
    transition: color 0.3s ease;
}

#gratis-seo-scan .wpcf7-form .wpcf7-list-item-label a:hover {
    color: var(--accent-color);
}

/* Checkbox hover state */
#gratis-seo-scan .wpcf7-form input[type="checkbox"]:hover {
    border-color: var(--accent-color);
    transform: scale(1.05);
}

/* Focus state for accessibility */
#gratis-seo-scan .wpcf7-form input[type="checkbox"]:focus {
    outline: 2px solid var(--accent-color);
    outline-offset: 2px;
}

/* ===== Submit Button - Premium Design ===== */
#gratis-seo-scan .wpcf7-form input[type="submit"] {
    background: linear-gradient(90deg, var(--secondary-color) 0%, var(--accent-color) 100%);
    color: white;
    padding: 18px 40px;
    border: none;
    border-radius: 30px;
    font-size: 18px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    width: 100%;
    margin-top: 10px;
    box-shadow: 0 10px 30px rgba(243, 156, 18, 0.25);
    position: relative;
    overflow: hidden;
}

/* Button hover effect */
#gratis-seo-scan .wpcf7-form input[type="submit"]:hover {
    transform: translateY(-3px);
    box-shadow: 0 15px 40px rgba(243, 156, 18, 0.35);
}

/* Button active state */
#gratis-seo-scan .wpcf7-form input[type="submit"]:active {
    transform: translateY(-1px);
}

/* Disabled button state - Better UX */
#gratis-seo-scan .wpcf7-form input[type="submit"]:disabled {
    background: linear-gradient(90deg, #BDC3C7 0%, #95A5A6 100%);
    cursor: not-allowed;
    opacity: 0.6;
    box-shadow: none;
    transform: none;
}

/* Button shimmer effect on hover */
#gratis-seo-scan .wpcf7-form input[type="submit"]::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.3), transparent);
    transition: left 0.5s ease;
}

#gratis-seo-scan .wpcf7-form input[type="submit"]:hover::before {
    left: 100%;
}

/* ===== Error Messages ===== */
#gratis-seo-scan .wpcf7-form .wpcf7-not-valid-tip {
    color: var(--secondary-color);
    font-size: 13px;
    margin-top: 6px;
    display: block;
    font-weight: 500;
}

#gratis-seo-scan .wpcf7-form .wpcf7-response-output {
    border: 2px solid var(--border-color);
    border-radius: 12px;
    padding: 16px 20px;
    margin: 20px 0 0;
    font-size: 15px;
    font-weight: 500;
}

#gratis-seo-scan .wpcf7-form .wpcf7-response-output.wpcf7-validation-errors {
    border-color: var(--secondary-color);
    background: rgba(231, 76, 60, 0.05);
    color: var(--secondary-color);
}

#gratis-seo-scan .wpcf7-form .wpcf7-response-output.wpcf7-mail-sent-ok {
    border-color: var(--success-color);
    background: rgba(39, 174, 96, 0.05);
    color: var(--success-color);
}

/* ===== Loading Spinner ===== */
#gratis-seo-scan .wpcf7-form .wpcf7-spinner {
    position: absolute;
    right: 20px;
    top: 50%;
    transform: translateY(-50%);
    width: 20px;
    height: 20px;
    border: 3px solid rgba(243, 156, 18, 0.2);
    border-top-color: var(--accent-color);
    border-radius: 50%;
    animation: spin 0.6s linear infinite;
}

@keyframes spin {
    to {
        transform: translateY(-50%) rotate(360deg);
    }
}

/* ===== Mobile Optimizations ===== */
@media (max-width: 768px) {
    #gratis-seo-scan .wpcf7-form {
        padding: 30px 20px;
        border-radius: 12px;
    }

    #gratis-seo-scan .wpcf7-form label {
        font-size: 14px;
    }

    #gratis-seo-scan .wpcf7-form input[type="text"],
    #gratis-seo-scan .wpcf7-form input[type="email"],
    #gratis-seo-scan .wpcf7-form input[type="tel"],
    #gratis-seo-scan .wpcf7-form input[type="url"],
    #gratis-seo-scan .wpcf7-form textarea {
        padding: 14px 16px;
        font-size: 16px; /* Prevents iOS zoom */
    }

    #gratis-seo-scan .wpcf7-form input[type="submit"] {
        padding: 16px 32px;
        font-size: 17px;
    }

    #gratis-seo-scan .wpcf7-form textarea {
        min-height: 120px;
    }
}

/* ===== Small mobile screens ===== */
@media (max-width: 480px) {
    #gratis-seo-scan .wpcf7-form {
        padding: 25px 15px;
    }

    #gratis-seo-scan .wpcf7-form p {
        margin-bottom: 20px;
    }

    #gratis-seo-scan .wpcf7-form .wpcf7-list-item-label {
        font-size: 14px;
        gap: 10px;
    }

    #gratis-seo-scan .wpcf7-form .wpcf7-list-item-label::before {
        width: 22px;
        height: 22px;
        min-width: 22px;
    }
}

/* ===== Accessibility Enhancements ===== */
@media (prefers-reduced-motion: reduce) {
    #gratis-seo-scan .wpcf7-form input,
    #gratis-seo-scan .wpcf7-form textarea,
    #gratis-seo-scan .wpcf7-form input[type="submit"],
    #gratis-seo-scan .wpcf7-form .wpcf7-list-item-label::before {
        transition: none;
        animation: none;
    }
}

/* Focus visible for keyboard navigation */
#gratis-seo-scan .wpcf7-form input:focus-visible,
#gratis-seo-scan .wpcf7-form textarea:focus-visible,
#gratis-seo-scan .wpcf7-form input[type="checkbox"]:focus-visible + .wpcf7-list-item-label::before {
    outline: 3px solid var(--accent-color);
    outline-offset: 2px;
}

/* High contrast mode support */
@media (prefers-contrast: high) {
    #gratis-seo-scan .wpcf7-form input[type="text"],
    #gratis-seo-scan .wpcf7-form input[type="email"],
    #gratis-seo-scan .wpcf7-form input[type="tel"],
    #gratis-seo-scan .wpcf7-form input[type="url"],
    #gratis-seo-scan .wpcf7-form textarea {
        border-width: 3px;
    }

    #gratis-seo-scan .wpcf7-form .wpcf7-list-item-label::before {
        border-width: 3px;
    }
}
