/**
 * Frontend styles for Warranty Portal
 */

.warranty-registration-container {
    max-width: 800px;
    margin: 0 auto;
    padding: 20px;
    font-family: Arial, sans-serif;
    line-height: 1.6;
}

.warranty-title {
    color: #2c3e50;
    text-align: center;
    margin-bottom: 30px;
    font-size: 28px;
    border-bottom: 3px solid #EC4235;
    padding-bottom: 15px;
}

.warranty-intro {
    background: #f8f9fa;
    padding: 20px;
    border-radius: 8px;
    margin-bottom: 30px;
    border-left: 4px solid #EC4235;
    border-right: 4px solid #EC4235;
}

.warranty-intro p {
    margin-bottom: 10px;
}

.warranty-section {
    background: #fff;
    border: 1px solid #e1e5e9;
    border-radius: 8px;
    padding: 25px;
    margin-bottom: 25px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.warranty-section h3 {
    color: #2c3e50;
    margin-top: 0;
    margin-bottom: 20px;
    font-size: 20px;
    border-bottom: 2px solid #EC4235;
    padding-bottom: 10px;
}

.warranty-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
    margin-bottom: 20px;
}

.warranty-field {
    display: flex;
    flex-direction: column;
}

.warranty-field label {
    font-weight: bold;
    color: #2c3e50;
    margin-bottom: 5px;
    font-size: 14px;
}

.warranty-field label a {
    color: #EC4235 !important;
    text-decoration: underline;
    font-weight: normal;
}

.warranty-field label a:hover {
    color: #2980b9 !important;
    text-decoration: none;
}

.warranty-field label a.terms-link {
    color: #EC4235 !important;
}

.warranty-field label a.terms-link:hover {
    color: #a44 !important;
    text-decoration: underline;
}

.warranty-field input,
.warranty-field textarea,
.warranty-field select {
    padding: 12px;
    border: 2px solid #e1e5e9;
    border-radius: 6px;
    font-size: 14px;
    transition: border-color 0.3s ease;
}

.warranty-field input:focus,
.warranty-field textarea:focus,
.warranty-field select:focus {
    outline: none;
    border-color: #EC4235;
    box-shadow: 0 0 0 3px rgba(52, 152, 219, 0.1);
}

.warranty-field input[readonly] {
    background-color: #f8f9fa;
    color: #6c757d;
}

.warranty-field small {
    color: #6c757d;
    font-size: 12px;
    margin-top: 5px;
}

.required {
    color: #e74c3c;
    font-weight: bold;
}

.warranty-terms {
    background: #f8f9fa;
    padding: 20px;
    border-radius: 6px;
    margin-top: 20px;
}

.warranty-terms h4 {
    color: #2c3e50;
    margin-top: 0;
    margin-bottom: 15px;
}

.terms-content {
    max-height: 200px;
    overflow-y: auto;
    padding: 15px;
    background: #fff;
    border: 1px solid #e1e5e9;
    border-radius: 4px;
    font-size: 13px;
    line-height: 1.5;
}

.warranty-submit {
    text-align: center;
    margin-top: 30px;
}

.warranty-submit-btn {
    background: linear-gradient(135deg, #721c24, #EC4235);
    color: white !important;
    border: none;
    padding: 15px 40px;
    font-size: 16px;
    font-weight: bold;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 6px rgba(0,0,0,0.1);
}

.warranty-submit-btn:hover {
    background: linear-gradient(135deg, #EC4235, #a44);
    transform: translateY(-2px);
    box-shadow: 0 6px 12px rgba(0,0,0,0.15);
}

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

.warranty-message {
    margin-top: 20px;
    padding: 15px;
    border-radius: 6px;
    font-weight: bold;
}

.warranty-message.success {
    background: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

.warranty-message.error {
    background: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

.warranty-footer {
    background: #2c3e50;
    color: white;
    padding: 20px;
    border-radius: 8px;
    margin-top: 30px;
    text-align: center;
}

.warranty-footer p {
    margin-bottom: 10px;
}

.warranty-footer p:last-child {
    margin-bottom: 0;
}

/* Serial Verification */
#serial-verification-message {
    margin-top: 5px;
    padding: 8px;
    border-radius: 4px;
    font-size: 12px;
    font-weight: bold;
}

#serial-verification-message.success {
    background: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

#serial-verification-message.error {
    background: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

/* Loading State */
.warranty-loading {
    opacity: 0.6;
    pointer-events: none;
}

.warranty-loading::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 20px;
    height: 20px;
    margin: -10px 0 0 -10px;
    border: 2px solid #f3f3f3;
    border-top: 2px solid #EC4235;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

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

/* Responsive Design */
@media (max-width: 768px) {
    .warranty-registration-container {
        padding: 15px;
    }
    
    .warranty-title {
        font-size: 24px;
    }
    
    .warranty-row {
        grid-template-columns: 1fr;
        gap: 15px;
    }
    
    .warranty-section {
        padding: 20px;
    }
    
    .warranty-submit-btn {
        padding: 12px 30px;
        font-size: 14px;
    }
}

@media (max-width: 480px) {
    .warranty-registration-container {
        padding: 10px;
    }
    
    .warranty-section {
        padding: 15px;
    }
    
    .warranty-field input,
    .warranty-field textarea,
    .warranty-field select {
        padding: 10px;
    }
}
