/**
 * TiraLedPiscina - Contact Form Styles
 * Shared CSS for all language versions
 */

:root {
    --primary: #3471AD;
    --primary-light: #4A8BC7;
    --water: #6DB3E8;
    --white: #FFFFFF;
    --light: #F5F7FA;
    --medium: #E8ECF1;
    --dark: #1A2B3C;
    --darker: #0f1f2e;
    --text: #4A5568;
    --text-light: #94a3b8;
    --success: #059669;
    --warning: #F59E0B;
    --error: #EF4444;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    color: var(--white);
    line-height: 1.6;
    background: linear-gradient(180deg, var(--dark) 0%, var(--darker) 100%);
    min-height: 100vh;
}

/* Header */
.header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    padding: 20px 40px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: var(--dark);
    transition: all 0.3s;
}

.logo {
    font-size: 1.5rem;
    font-weight: 800;
    color: var(--white);
    text-decoration: none;
}

.logo span {
    color: var(--water);
}

.nav {
    display: flex;
    gap: 30px;
    align-items: center;
}

.nav a {
    color: var(--white);
    text-decoration: none;
    font-weight: 500;
    font-size: 0.9rem;
    opacity: 0.9;
    transition: all 0.3s;
}

.nav a:hover,
.nav a.active {
    opacity: 1;
    color: var(--water);
}

.header-actions {
    display: flex;
    align-items: center;
    gap: 12px;
}

.lang-switcher {
    display: flex;
    gap: 8px;
    align-items: center;
}

.lang-btn {
    padding: 6px 14px;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 600;
    text-decoration: none;
    transition: all 0.3s;
    background: transparent;
    border: 1px solid rgba(255, 255, 255, 0.3);
    color: var(--white);
}

.lang-btn:hover {
    border-color: var(--water);
    color: var(--water);
}

.lang-btn.active {
    background: var(--white);
    color: var(--primary);
    border-color: var(--white);
}

/* Page Wrapper */
.page-wrapper {
    max-width: 900px;
    margin: 0 auto;
    padding: 140px 20px 80px;
}

.page-header {
    text-align: center;
    margin-bottom: 50px;
}

.page-header h1 {
    font-size: 2.2rem;
    font-weight: 800;
    color: var(--white);
    margin-bottom: 15px;
}

.page-header p {
    font-size: 1.1rem;
    color: var(--text-light);
    max-width: 600px;
    margin: 0 auto;
}

.page-header .badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: rgba(5, 150, 105, 0.2);
    border: 1px solid rgba(5, 150, 105, 0.4);
    padding: 8px 20px;
    border-radius: 50px;
    font-size: 0.85rem;
    color: var(--success);
    margin-bottom: 20px;
}

/* Configurator Form */
.configurator {
    background: rgba(255, 255, 255, 0.05);
    border-radius: 24px;
    padding: 40px;
    border: 1px solid rgba(255, 255, 255, 0.12);
}

/* Form Sections */
.form-section {
    margin-bottom: 35px;
    padding-bottom: 35px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.form-section:last-child {
    border-bottom: none;
    margin-bottom: 0;
    padding-bottom: 0;
}

.form-section h3 {
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--white);
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    gap: 12px;
}

.section-icon {
    width: 36px;
    height: 36px;
    background: var(--primary);
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.section-icon svg {
    width: 18px;
    height: 18px;
    color: var(--white);
}

.required-badge {
    font-size: 0.7rem;
    background: var(--error);
    color: var(--white);
    padding: 4px 10px;
    border-radius: 20px;
    font-weight: 600;
}

/* Form Grid */
.form-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 18px;
}

.form-grid-3 {
    grid-template-columns: 1fr 1fr 1fr;
}

/* Form Groups */
.form-group {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.form-group.full {
    grid-column: span 2;
}

.form-group label {
    font-size: 0.85rem;
    font-weight: 600;
    color: rgba(255, 255, 255, 0.9);
}

.form-group label .required {
    color: #EF4444;
}

.form-group input,
.form-group select,
.form-group textarea {
    background: rgba(255, 255, 255, 0.1);
    border: 2px solid rgba(255, 255, 255, 0.2);
    border-radius: 12px;
    padding: 14px 16px;
    color: var(--white);
    font-size: 1rem;
    font-family: inherit;
    transition: all 0.3s;
    width: 100%;
}

.form-group input::placeholder,
.form-group textarea::placeholder {
    color: rgba(255, 255, 255, 0.4);
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--water);
    background: rgba(255, 255, 255, 0.15);
}

.form-group input.error,
.form-group select.error,
.form-group textarea.error {
    border-color: var(--error);
    background: rgba(239, 68, 68, 0.1);
}

.form-group select option {
    background: var(--dark);
    color: var(--white);
}

.form-group textarea {
    min-height: 100px;
    resize: vertical;
}

.error-message {
    font-size: 0.75rem;
    color: var(--error);
    display: none;
}

.form-group input.error + .error-message,
.form-group select.error + .error-message,
.form-group textarea.error + .error-message {
    display: block;
}

/* Radio Grid */
.radio-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 12px;
}

.radio-card {
    background: rgba(255, 255, 255, 0.08);
    border: 2px solid rgba(255, 255, 255, 0.12);
    border-radius: 14px;
    padding: 16px;
    cursor: pointer;
    transition: all 0.3s;
    text-align: center;
    position: relative;
}

.radio-card:hover {
    border-color: var(--water);
    background: rgba(255, 255, 255, 0.12);
}

.radio-card.selected {
    border-color: var(--primary);
    background: rgba(52, 113, 173, 0.2);
}

.radio-card input {
    position: absolute;
    opacity: 0;
}

.radio-card h4 {
    font-size: 0.95rem;
    font-weight: 600;
    color: var(--white);
    margin-bottom: 4px;
}

.radio-card p {
    font-size: 0.75rem;
    color: var(--text-light);
}

/* Checkbox Grid */
.checkbox-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 14px;
}

.checkbox-card {
    background: rgba(255, 255, 255, 0.08);
    border: 2px solid rgba(255, 255, 255, 0.1);
    border-radius: 14px;
    padding: 18px;
    cursor: pointer;
    transition: all 0.3s;
    text-align: center;
    position: relative;
}

.checkbox-card:hover {
    border-color: var(--water);
    background: rgba(255, 255, 255, 0.12);
}

.checkbox-card.selected {
    border-color: var(--primary);
    background: rgba(52, 113, 173, 0.2);
}

.checkbox-card input {
    display: none;
}

.checkbox-card h4 {
    font-size: 0.95rem;
    font-weight: 600;
    color: var(--white);
    margin-bottom: 4px;
}

.checkbox-card p {
    font-size: 0.75rem;
    color: var(--text-light);
}

/* Option Groups */
.option-group {
    margin-top: 20px;
    display: none;
}

.option-group.show {
    display: block;
}

.option-label {
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--text-light);
    margin-bottom: 12px;
}

.chip-flex {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.chip {
    background: rgba(255, 255, 255, 0.08);
    border: 2px solid rgba(255, 255, 255, 0.15);
    border-radius: 12px;
    padding: 10px 18px;
    font-size: 0.9rem;
    color: var(--white);
    cursor: pointer;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    gap: 8px;
}

.chip:hover {
    border-color: var(--water);
    background: rgba(255, 255, 255, 0.12);
}

.chip input {
    display: none;
}

.chip.selected {
    background: rgba(52, 113, 173, 0.3);
    border-color: var(--primary);
}

.chip.selected::before {
    content: "✓ ";
    font-weight: bold;
    color: var(--water);
}

/* Checkbox Flex (multiple selection) */
.checkbox-flex {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.checkbox-chip {
    background: rgba(255, 255, 255, 0.08);
    border: 2px solid rgba(255, 255, 255, 0.15);
    border-radius: 12px;
    padding: 10px 18px;
    font-size: 0.9rem;
    color: var(--white);
    cursor: pointer;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    gap: 8px;
}

.checkbox-chip:hover {
    border-color: var(--water);
    background: rgba(255, 255, 255, 0.12);
}

.checkbox-chip input {
    display: none;
}

.checkbox-chip.selected {
    background: rgba(52, 113, 173, 0.3);
    border-color: var(--primary);
}

.checkbox-chip.selected::before {
    content: "✓ ";
    font-weight: bold;
    color: var(--water);
}

/* Photo Upload */
.photo-categories {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
    margin-bottom: 20px;
}

.photo-category {
    background: rgba(255, 255, 255, 0.05);
    border: 2px solid rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    padding: 15px;
    cursor: pointer;
    transition: all 0.3s;
}

.photo-category:hover {
    border-color: var(--water);
}

.photo-category.selected {
    border-color: var(--primary);
    background: rgba(52, 113, 173, 0.15);
}

.photo-category input {
    display: none;
}

.photo-category label {
    display: flex;
    align-items: center;
    gap: 10px;
    cursor: pointer;
}

.photo-category .checkbox {
    width: 20px;
    height: 20px;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-radius: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
}

.photo-category.selected .checkbox {
    background: var(--primary);
    border-color: var(--primary);
}

.photo-category.selected .checkbox::before {
    content: "✓";
    color: var(--white);
    font-size: 12px;
    font-weight: bold;
}

.photo-category .category-text h4 {
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--white);
    margin-bottom: 2px;
}

.photo-category .category-text p {
    font-size: 0.75rem;
    color: var(--text-light);
}

/* File Upload Area */
.file-upload-area {
    border: 2px dashed rgba(255, 255, 255, 0.3);
    border-radius: 16px;
    padding: 35px;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s;
    background: rgba(255, 255, 255, 0.03);
}

.file-upload-area:hover,
.file-upload-area.dragover {
    border-color: var(--water);
    background: rgba(109, 179, 232, 0.1);
}

.file-upload-area input {
    display: none;
}

.file-upload-icon {
    font-size: 2.5rem;
    margin-bottom: 15px;
}

.file-upload-icon svg {
    width: 48px;
    height: 48px;
    color: var(--water);
}

.file-upload-text {
    font-size: 1rem;
    color: rgba(255, 255, 255, 0.9);
    margin-bottom: 8px;
}

.file-upload-hint {
    font-size: 0.8rem;
    color: rgba(255, 255, 255, 0.5);
}

.file-upload-formats {
    font-size: 0.75rem;
    color: var(--text-light);
    margin-top: 10px;
}

/* Upload Progress */
.upload-progress {
    margin-top: 15px;
    display: none;
}

.upload-progress.show {
    display: block;
}

.progress-bar {
    width: 100%;
    height: 6px;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 3px;
    overflow: hidden;
}

.progress-fill {
    height: 100%;
    background: var(--water);
    border-radius: 3px;
    transition: width 0.3s;
    width: 0%;
}

.progress-text {
    font-size: 0.8rem;
    color: var(--text-light);
    margin-top: 8px;
    text-align: center;
}

/* File List */
.file-list {
    margin-top: 20px;
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
}

.file-item {
    background: rgba(255, 255, 255, 0.1);
    padding: 10px 14px;
    border-radius: 10px;
    font-size: 0.85rem;
    color: var(--white);
    display: flex;
    align-items: center;
    gap: 10px;
    animation: fadeIn 0.3s ease;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.file-item.image {
    min-width: 120px;
}

.file-item img {
    width: 40px;
    height: 40px;
    object-fit: cover;
    border-radius: 6px;
}

.file-item .file-icon {
    width: 40px;
    height: 40px;
    background: var(--primary);
    border-radius: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.file-item .file-icon svg {
    width: 20px;
    height: 20px;
    color: var(--white);
}

.file-item .file-name {
    max-width: 150px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.file-item .file-size {
    font-size: 0.75rem;
    color: var(--text-light);
}

.file-item button {
    background: none;
    border: none;
    color: #EF4444;
    cursor: pointer;
    font-size: 1.1rem;
    padding: 0;
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.file-item button:hover {
    color: #F87171;
}

/* Consent Section */
.consent-section {
    background: rgba(5, 150, 105, 0.1);
    border: 1px solid rgba(5, 150, 105, 0.3);
    border-radius: 16px;
    padding: 24px;
    margin-top: 30px;
}

.consent-item {
    display: flex;
    align-items: flex-start;
    gap: 14px;
}

.consent-item input {
    width: 20px;
    height: 20px;
    accent-color: var(--success);
    margin-top: 2px;
}

.consent-item label {
    font-size: 0.9rem;
    color: rgba(255, 255, 255, 0.85);
    line-height: 1.6;
}

.consent-item a {
    color: var(--water);
    text-decoration: underline;
}

.consent-item.error input {
    border: 2px solid var(--error);
}

/* Submit Button */
.btn-submit {
    background: var(--success);
    color: var(--white);
    border: none;
    border-radius: 50px;
    padding: 18px 45px;
    font-size: 1.1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
    width: 100%;
    margin-top: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
}

.btn-submit:hover {
    background: #047857;
    transform: translateY(-2px);
    box-shadow: 0 15px 40px rgba(5, 150, 105, 0.35);
}

.btn-submit:disabled {
    background: #6B7280;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

.btn-submit svg {
    width: 22px;
    height: 22px;
}

/* Success Message */
.success-message {
    display: none;
    text-align: center;
    padding: 60px 40px;
}

.success-message.show {
    display: block;
}

.success-message .success-icon {
    width: 100px;
    height: 100px;
    background: linear-gradient(135deg, var(--success), #047857);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 30px;
}

.success-message .success-icon svg {
    width: 50px;
    height: 50px;
    color: var(--white);
}

.success-message h2 {
    font-size: 2rem;
    font-weight: 800;
    color: var(--white);
    margin-bottom: 15px;
}

.success-message p {
    color: var(--text-light);
    font-size: 1.1rem;
    line-height: 1.7;
    max-width: 500px;
    margin: 0 auto;
}

/* Footer */
.footer {
    background: var(--dark);
    color: var(--white);
    padding: 60px 40px 30px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.footer-grid {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr 1fr;
    gap: 50px;
    margin-bottom: 50px;
}

.footer-brand h3 {
    font-size: 1.4rem;
    font-weight: 800;
    margin-bottom: 15px;
}

.footer-brand h3 span {
    color: var(--water);
}

.footer-brand > p {
    font-size: 0.9rem;
    opacity: 0.75;
    line-height: 1.7;
    margin-bottom: 20px;
}

.footer-email {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 20px;
}

.footer-email svg {
    width: 20px;
    height: 20px;
    color: var(--water);
}

.footer-email a {
    color: var(--white);
    text-decoration: none;
    font-weight: 600;
    font-size: 1.1rem;
}

.footer h4 {
    font-size: 1rem;
    font-weight: 700;
    margin-bottom: 20px;
}

.footer-links {
    list-style: none;
}

.footer-links li {
    margin-bottom: 12px;
}

.footer-links a {
    color: rgba(255, 255, 255, 0.7);
    text-decoration: none;
    font-size: 0.9rem;
    transition: color 0.3s;
}

.footer-links a:hover {
    color: var(--water);
}

.footer-bottom {
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    padding-top: 30px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.footer-bottom p {
    font-size: 0.85rem;
    opacity: 0.6;
}

/* WhatsApp Button */
.whatsapp-btn {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 60px;
    height: 60px;
    background: #25D366;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 10px 30px rgba(37, 211, 102, 0.4);
    z-index: 999;
    transition: all 0.3s;
}

.whatsapp-btn:hover {
    transform: scale(1.1);
}

.whatsapp-btn svg {
    width: 32px;
    height: 32px;
    color: var(--white);
}

/* Spin Animation */
.spin {
    animation: spin 1s linear infinite;
}

@keyframes spin {
    from {
        transform: rotate(0deg);
    }
    to {
        transform: rotate(360deg);
    }
}

/* Responsive Design */
@media (max-width: 768px) {
    .header {
        padding: 15px 20px;
    }

    .nav {
        display: none;
    }

    .page-wrapper {
        padding: 120px 15px 60px;
    }

    .configurator {
        padding: 25px 20px;
        border-radius: 20px;
    }

    .page-header h1 {
        font-size: 1.7rem;
    }

    .form-grid {
        grid-template-columns: 1fr;
    }

    .form-grid-3,
    .checkbox-grid {
        grid-template-columns: 1fr 1fr;
    }

    .form-group.full {
        grid-column: span 1;
    }

    .radio-grid {
        grid-template-columns: 1fr 1fr;
    }

    .photo-categories {
        grid-template-columns: 1fr;
    }

    .footer-grid {
        grid-template-columns: 1fr;
        gap: 30px;
    }

    .whatsapp-btn {
        bottom: 20px;
        right: 20px;
        width: 50px;
        height: 50px;
    }

    .whatsapp-btn svg {
        width: 26px;
        height: 26px;
    }
}

@media (max-width: 480px) {
    .checkbox-grid {
        grid-template-columns: 1fr;
    }

    .form-grid-3 {
        grid-template-columns: 1fr;
    }
}

/* Validation Error Summary */
.validation-error {
    background: rgba(239, 68, 68, 0.15);
    border: 2px solid var(--error);
    border-radius: 16px;
    padding: 24px;
    margin-bottom: 25px;
    display: none;
}

.validation-error.show {
    display: block;
    animation: shake 0.5s ease;
}

@keyframes shake {
    0%, 100% { transform: translateX(0); }
    10%, 30%, 50%, 70%, 90% { transform: translateX(-5px); }
    20%, 40%, 60%, 80% { transform: translateX(5px); }
}

.validation-error h4 {
    color: var(--error);
    font-size: 1.1rem;
    font-weight: 700;
    margin-bottom: 15px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.validation-error h4 svg {
    width: 24px;
    height: 24px;
}

.validation-error ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.validation-error li {
    color: rgba(255, 255, 255, 0.9);
    padding: 8px 0;
    padding-left: 28px;
    position: relative;
    font-size: 0.95rem;
}

.validation-error li::before {
    content: "•";
    color: var(--error);
    position: absolute;
    left: 10px;
    font-size: 1.2rem;
}

/* Checkbox card error state */
.checkbox-card.error {
    border-color: var(--error);
    background: rgba(239, 68, 68, 0.1);
}
