/* Warranty Activation Form Styles */

/* Hide reCAPTCHA badge */
.grecaptcha-badge {
    visibility: hidden !important;
}

body.privacy-policy,
body.page-id-79 {
    background-color: initial;
    max-width: 860px;
    margin: 0 auto;
}

.print-link {
    padding-inline: 30px;
}

@media print {
    #warranty-conditions-modal {
        position: initial;
    }
    
    .warranty-modal-content {
        background-color: transparent !important;
        box-shadow: none !important;
        max-height: initial !important;
    }
    
    .warranty-modal-body {
        overflow-y: initial !important;
    }
    
    .warranty-important-notice {
        margin-top: 130px !important;
    }
    
    #printer-home,
    .warranty-activation-container,
    .warranty-logo-section,
    .warranty-modal-footer {
        display: none;
    }
}

/* Logo Section */
.warranty-logo-section {
    text-align: center;
    padding: 30px 20px 30px;
    margin-bottom: 0;
}

.warranty-logo {
    max-width: 250px;
    height: auto;
    display: block;
    margin: 0 auto;
}

.warranty-activation-container {
    max-width: 860px;
    margin: 20px auto 30px;
    padding: 30px;
    font-family: 'Lato', 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    line-height: 1.6;
    color: #333;
    background-color: #fff;
    border-radius: 8px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
}

/* Header */
.warranty-header {
    text-align: center;
    margin-bottom: 40px;
    padding-bottom: 20px;
    border-bottom: 3px solid #0073aa;
}

.warranty-header h2 {
    color: #0073aa;
    font-size: 2rem;
    font-weight: 600;
    margin: 0;
}

/* Main Form */
.warranty-main {
    margin-bottom: 40px;
}

.warranty-form {
    background: #fff;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    overflow: hidden;
}

/* Form Sections */
.form-section {
    padding: 30px;
    border-bottom: 1px solid #eee;
}

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

.form-section h3 {
    color: #0073aa;
    font-size: 1.3rem;
    margin-bottom: 20px;
    font-weight: 600;
    border-left: 4px solid #0073aa;
    padding-left: 15px;
}

/* Form Groups */
.form-group {
    margin-bottom: 20px;
}

.form-row {
    display: flex;
    gap: 20px;
    margin-bottom: 20px;
}

.form-row .form-group {
    flex: 1;
    margin-bottom: 0;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    color: #444;
}

.form-group input[type="text"],
.form-group input[type="email"],
.form-group input[type="tel"],
.form-group textarea {
    width: 100%;
    padding: 12px 16px;
    border: 2px solid #ddd;
    border-radius: 4px;
    font-size: 16px;
    transition: all 0.3s ease;
    box-sizing: border-box;
    font-family: 'Lato', 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

.form-group input[type="text"]:focus,
.form-group input[type="email"]:focus,
.form-group input[type="tel"]:focus,
.form-group textarea:focus {
    outline: none;
    border-color: #0073aa;
    box-shadow: 0 0 0 3px rgba(0, 115, 170, 0.1);
}

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

/* Remove default invalid styling - we'll handle it with JS */
.form-group input[type="text"]:invalid,
.form-group input[type="email"]:invalid,
.form-group input[type="tel"]:invalid,
.form-group textarea:invalid {
    border-color: #ddd;
    box-shadow: none;
}

/* Error state styling applied by JavaScript */
.form-group.has-error input[type="text"],
.form-group.has-error input[type="email"],
.form-group.has-error input[type="tel"],
.form-group.has-error textarea {
    border-color: #dc3232;
    background-color: #fff5f5;
}

.form-group.has-error input[type="text"]:focus,
.form-group.has-error input[type="email"]:focus,
.form-group.has-error input[type="tel"]:focus,
.form-group.has-error textarea:focus {
    border-color: #dc3232;
    box-shadow: 0 0 0 3px rgba(220, 50, 50, 0.1);
}

/* Field error messages */
.field-error {
    display: block;
    color: #dc3232;
    font-size: 14px;
    margin-top: 5px;
    font-weight: 500;
}

/* Radio Groups */
.radio-group {
    display: flex;
    gap: 30px;
    margin-top: 10px;
}

.radio-group label {
    display: flex;
    align-items: center;
    cursor: pointer;
    font-weight: 500;
}

.radio-group input[type="radio"] {
    margin-right: 10px;
    transform: scale(1.2);
}

/* Customer Type Sections */
.customer-private,
.customer-company {
    background: #f9f9f9;
    border-radius: 6px;
    margin-top: 20px;
}

/* Installation Address Section */
.installation-address-fields {
    background: #f0f7ff;
    border-radius: 6px;
    padding: 20px;
    margin-top: 20px;
    border-left: 4px solid #0073aa;
    margin-bottom: 0;
}

.installation-address-fields h4 {
    color: #0073aa;
    font-size: 1.1rem;
    margin-bottom: 15px;
    font-weight: 600;
    margin-top: 0;
}

/* Remove bottom margin from company section when installation fields are hidden */
.customer-company.no-installation-address {
    margin-bottom: 0;
}

/* Privacy Section */
.privacy-section {
    background: #f9f9f9;
    border-radius: 6px;
    padding: 25px;
}

.privacy-group {
    margin-bottom: 0;
}

.privacy-group .privacy-label {
    display: flex;
    align-items: center;
    cursor: pointer;
    font-weight: normal;
    margin-bottom: 0;
}

.privacy-label input[type="checkbox"] {
    margin-right: 12px;
    margin-top: 0;
    transform: scale(1.2);
    flex-shrink: 0;
}

.privacy-text {
    line-height: 1.5;
    font-size: 14px;
    color: #555;
}

.privacy-text a {
    color: #0073aa;
    text-decoration: underline;
    font-weight: 500;
}

.privacy-text a:hover {
    color: #005177;
}

/* reCAPTCHA Notice */
.recaptcha-notice {
    margin-top: 25px;
    padding-top: 25px;
    border-top: 1px solid #ddd;
}

.recaptcha-notice p {
    font-size: 12px;
    color: #666;
    margin: 0;
    text-align: center;
    line-height: 1.4;
}

.recaptcha-notice a {
    color: #0073aa;
    text-decoration: none;
}

.recaptcha-notice a:hover {
    text-decoration: underline;
}

/* Warranty Conditions Modal */
.warranty-modal {
    display: none;
    position: fixed;
    z-index: 9999;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.8);
    justify-content: center;
    align-items: center;
    padding: 20px;
    box-sizing: border-box;
}

.warranty-modal-content {
    background-color: #fff;
    border-radius: 8px;
    max-width: 800px;
    width: 100%;
    max-height: 90vh;
    display: flex;
    flex-direction: column;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
}

.warranty-modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 25px 30px 20px;
    border-bottom: 2px solid #e5e5e5;
    background-color: #f8f9fa;
    border-radius: 8px 8px 0 0;
}

.warranty-modal-header h2 {
    margin: 0;
    color: #0073aa;
    font-size: 24px;
    font-weight: 600;
}

.warranty-modal-close {
    font-size: 32px;
    font-weight: bold;
    color: #666;
    cursor: pointer;
    line-height: 1;
    width: 35px;
    height: 35px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: all 0.2s ease;
}

.warranty-modal-close:hover {
    background-color: #dc3232;
    color: white;
}

.warranty-modal-body {
    flex: 1;
    overflow-y: auto;
    padding: 0;
}

.warranty-conditions-content {
    padding: 30px;
    line-height: 1.6;
    color: #333;
}

.warranty-company-header {
    text-align: center;
    margin-bottom: 30px;
    padding: 20px;
    background-color: #f8f9fa;
    border-radius: 6px;
    border-left: 4px solid #0073aa;
}

.warranty-conditions-content h3 {
    color: #0073aa;
    font-size: 22px;
    margin: 30px 0 20px 0;
    text-align: center;
    font-weight: 600;
}

.warranty-conditions-content > p:first-of-type {
    margin-bottom: 25px;
}

.warranty-conditions-content ol {
    padding-left: 0;
    counter-reset: warranty-counter;
}

.warranty-conditions-content ol > li {
    list-style: none;
    margin-bottom: 20px;
    padding: 15px;
    background-color: #f9f9f9;
    border-radius: 6px;
    border-left: 4px solid #0073aa;
    counter-increment: warranty-counter;
    position: relative;
}

.warranty-conditions-content ol > li::before {
    content: counter(warranty-counter);
    position: absolute;
    left: -25px;
    top: 15px;
    background-color: #0073aa;
    color: white;
    width: 30px;
    height: 30px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    font-size: 14px;
}

.warranty-conditions-content ul {
    margin: 15px 0;
    padding-left: 25px;
}

.warranty-conditions-content ul li {
    margin-bottom: 8px;
}

.warranty-important-notice {
    background-color: #fff3cd;
    border: 2px solid #ffc107;
    border-radius: 8px;
    padding: 25px;
    margin-top: 30px;
}

.warranty-important-notice h4 {
    color: #856404;
    margin-top: 0;
    margin-bottom: 15px;
    font-size: 18px;
    font-weight: 700;
    text-transform: uppercase;
    text-align: center;
}

.warranty-important-notice p {
    margin: 0;
    color: #856404;
    font-weight: 600;
    text-align: center;
}

.warranty-modal-footer {
    padding: 20px 30px;
    border-top: 1px solid #e5e5e5;
    text-align: center;
    background-color: #f8f9fa;
    border-radius: 0 0 8px 8px;
}

.warranty-modal-close-btn {
    background-color: #0073aa;
    color: white;
    border: none;
    padding: 12px 30px;
    border-radius: 6px;
    font-size: 16px;
    cursor: pointer;
    transition: background-color 0.2s ease;
    font-weight: 500;
}

.warranty-modal-close-btn:hover {
    background-color: #005177;
}

/* Mobile responsiveness for modal */
@media (max-width: 768px) {
    .warranty-modal {
        padding: 10px;
    }

    .warranty-modal-content {
        max-height: 95vh;
    }

    .warranty-modal-header {
        padding: 20px 20px 15px;
    }

    .warranty-modal-header h2 {
        font-size: 20px;
    }

    .warranty-conditions-content {
        padding: 20px;
    }

    .warranty-conditions-content ol > li::before {
        left: -20px;
        width: 25px;
        height: 25px;
        font-size: 12px;
    }

    .warranty-modal-close {
        font-size: 28px;
        width: 30px;
        height: 30px;
    }
}

/* Submit Section */
.form-submit {
    padding: 30px;
    text-align: center;
    background: #f5f5f5;
}

.submit-btn {
    background: linear-gradient(135deg, #0073aa, #005177);
    color: white;
    padding: 15px 40px;
    border: none;
    border-radius: 6px;
    font-size: 18px;
    font-weight: 600;
    font-family: 'Lato', 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    cursor: pointer;
    transition: all 0.3s ease;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.submit-btn:hover:not(:disabled) {
    background: linear-gradient(135deg, #005177, #003d5c);
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(0, 115, 170, 0.3);
}

.submit-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
}

/* Messages */
.form-messages {
    margin: 20px 0;
    padding: 15px;
    border-radius: 4px;
    font-weight: 500;
    display: none;
}

.form-messages.success {
    background: #dff0d8;
    border: 1px solid #d6e9c6;
    color: #3c763d;
}

.form-messages.error {
    background: #f2dede;
    border: 1px solid #ebccd1;
    color: #a94442;
}

/* Footer */
.warranty-footer {
    margin-top: 40px;
    padding: 30px 0 20px;
    border-top: 2px solid #0073aa;
    background: #f8f9fa;
    color: #333;
    font-size: 14px;
}

.footer-content {
    margin-bottom: 25px;
}

.footer-company h3 {
    color: #0073aa;
    font-size: 1.4rem;
    font-weight: 700;
    margin-bottom: 15px;
    text-align: center;
}

.footer-address,
.footer-contacts {
    text-align: center;
    margin-bottom: 15px;
}

.footer-address p,
.footer-contacts p {
    margin: 5px 0;
    line-height: 1.4;
}

.footer-contacts a {
    color: #0073aa;
    text-decoration: none;
    font-weight: 500;
    transition: color 0.3s ease;
}

.footer-contacts a:hover {
    color: #005177;
    text-decoration: underline;
}

.footer-bottom {
    border-top: 1px solid #ddd;
    padding-top: 20px;
    text-align: center;
}

.footer-copyright {
    margin-bottom: 15px;
}

.footer-copyright p {
    font-size: 12px;
    color: #666;
    line-height: 1.5;
    margin: 0;
    padding: 0 15px;
}

.footer-links {
    display: flex;
    justify-content: center;
    gap: 20px;
    flex-wrap: wrap;
}

.footer-links a {
    color: #0073aa;
    text-decoration: none;
    font-size: 13px;
    font-weight: 500;
    transition: color 0.3s ease;
}

.footer-links a:hover {
    color: #005177;
    text-decoration: underline;
}

/* Responsive Design */
@media (max-width: 768px) {
    .warranty-activation-container {
        margin: 10px;
        padding: 20px;
    }

    .warranty-logo-section {
        padding: 20px 15px 15px;
    }

    .warranty-logo {
        max-width: 200px;
    }

    .warranty-header h2 {
        font-size: 1.5rem;
    }

    .form-section {
        padding: 20px;
    }

    .form-row {
        flex-direction: column;
        gap: 0;
    }

    .radio-group {
        flex-direction: column;
        gap: 15px;
    }

    .submit-btn {
        width: 100%;
        padding: 15px;
    }

    .footer-links {
        flex-direction: column;
        gap: 10px;
    }

    .footer-copyright p {
        font-size: 11px;
    }

    .privacy-section {
        padding: 20px;
    }

    .privacy-text {
        font-size: 13px;
    }
}

@media (max-width: 480px) {
    .warranty-activation-container {
        margin: 5px;
        padding: 15px;
    }

    .warranty-logo-section {
        padding: 15px 10px 10px;
    }

    .warranty-logo {
        max-width: 180px;
    }

    .warranty-header h2 {
        font-size: 1.3rem;
    }

    .form-section {
        padding: 15px;
    }

    .form-group input[type="text"],
    .form-group input[type="email"],
    .form-group input[type="tel"],
    .form-group textarea {
        font-size: 16px; /* Prevents zoom on iOS */
    }

    .footer-company h3 {
        font-size: 1.2rem;
    }

    .footer-copyright p {
        font-size: 10px;
        line-height: 1.4;
    }

    .privacy-section {
        padding: 15px;
    }

    .privacy-text {
        font-size: 12px;
    }
}

/* Print Styles */
@media print {
    .submit-btn,
    .form-messages {
        display: none;
    }

    .warranty-activation-container {
        box-shadow: none;
    }

    .form-section {
        break-inside: avoid;
    }
}

/* Accessibility */
@media (prefers-reduced-motion: reduce) {
    * {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}

/* High Contrast Mode */
@media (prefers-contrast: high) {
    .form-group input[type="text"],
    .form-group input[type="email"],
    .form-group input[type="tel"] {
        border-width: 3px;
    }

    .submit-btn {
        border: 2px solid #000;
    }
}

/* Loading State */
.submit-btn:disabled::after {
    content: "";
    display: inline-block;
    width: 16px;
    height: 16px;
    margin-left: 10px;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-top: 2px solid #fff;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

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

/* Read-only fields styling */
.warranty-form input[readonly],
.warranty-form textarea[readonly] {
    background-color: #f5f5f5;
    cursor: not-allowed;
    opacity: 0.8;
    pointer-events: none;
    user-select: none;
}

/* Prevent focus styling on readonly fields */
.warranty-form input[readonly]:focus,
.warranty-form textarea[readonly]:focus {
    outline: none;
    border-color: #ddd;
    box-shadow: none;
}