/* DI Warranty Manager - Frontend Styles */

.di-warranty-form-container {
    max-width: 600px;
    margin: 0 auto;
    padding: 20px;
    background: #fff;
    border: 1px solid #ddd;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.di-warranty-form-title {
    margin: 0 0 20px 0;
    padding: 0;
    font-size: 24px;
    color: #333;
    text-align: center;
    border-bottom: 2px solid #0073aa;
    padding-bottom: 10px;
}

.di-warranty-form {
    margin: 0;
}

.di-warranty-row {
    display: flex;
    gap: 15px;
    margin-bottom: 15px;
}

.di-warranty-field {
    margin-bottom: 15px;
}

.di-warranty-field-half {
    flex: 1;
}

.di-warranty-field label {
    display: block;
    margin-bottom: 5px;
    font-weight: 600;
    color: #333;
}

.di-warranty-field input[type="text"],
.di-warranty-field input[type="email"],
.di-warranty-field input[type="tel"],
.di-warranty-field input[type="date"] {
    width: 100%;
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 14px;
    transition: border-color 0.3s ease;
    box-sizing: border-box;
}

/* Style select fields similarly to inputs */
.di-warranty-field select {
    width: 100%;
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 14px;
    transition: border-color 0.3s ease;
    box-sizing: border-box;
    background: #fff;
}

.di-warranty-field select:focus {
    outline: none;
    border-color: #0073aa;
    box-shadow: 0 0 0 2px rgba(0,115,170,0.2);
}

.di-warranty-field input[type="text"]:focus,
.di-warranty-field input[type="email"]:focus,
.di-warranty-field input[type="tel"]:focus,
.di-warranty-field input[type="date"]:focus {
    outline: none;
    border-color: #0073aa;
    box-shadow: 0 0 0 2px rgba(0,115,170,0.2);
}

.di-warranty-checkbox-label {
    display: flex;
    align-items: flex-start;
    gap: 8px;
    cursor: pointer;
    font-size: 14px;
    line-height: 1.4;
}

.di-warranty-checkbox-label input[type="checkbox"] {
    margin: 0;
    flex-shrink: 0;
    margin-top: 2px;
}

.di-warranty-checkbox-label a {
    color: #0073aa;
    text-decoration: underline;
}

.di-warranty-checkbox-label a:hover {
    text-decoration: none;
}

.di-warranty-submit-btn {
    width: 100%;
    padding: 12px 20px;
    background: #0073aa;
    color: #fff;
    border: none;
    border-radius: 4px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: background-color 0.3s ease;
}

.di-warranty-submit-btn:hover {
    background: #005a87;
}

.di-warranty-submit-btn:disabled {
    background: #ccc;
    cursor: not-allowed;
}

.di-warranty-honeypot {
    position: absolute;
    left: -9999px;
    width: 1px;
    height: 1px;
    overflow: hidden;
}

/* Messages */
#di-warranty-messages {
    margin-bottom: 20px;
}

.di-warranty-message {
    padding: 12px 15px;
    border-radius: 4px;
    margin-bottom: 10px;
    font-size: 14px;
}

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

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

.di-warranty-message.info {
    background: #d1ecf1;
    color: #0c5460;
    border: 1px solid #bee5eb;
}

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

.di-warranty-form.loading .di-warranty-submit-btn::after {
    content: "";
    display: inline-block;
    width: 16px;
    height: 16px;
    margin-left: 8px;
    border: 2px solid transparent;
    border-top: 2px solid #fff;
    border-radius: 50%;
    animation: di-warranty-spin 1s linear infinite;
}

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

/* Responsive design */
@media (max-width: 768px) {
    .di-warranty-form-container {
        margin: 10px;
        padding: 15px;
    }
    
    .di-warranty-row {
        flex-direction: column;
        gap: 0;
    }
    
    .di-warranty-field-half {
        flex: none;
    }
    
    .di-warranty-form-title {
        font-size: 20px;
    }
}

/* Field validation states */
.di-warranty-field input.error {
    border-color: #dc3545;
    box-shadow: 0 0 0 2px rgba(220,53,69,0.2);
}

.di-warranty-field input.success {
    border-color: #28a745;
    box-shadow: 0 0 0 2px rgba(40,167,69,0.2);
}

.di-warranty-field-error {
    color: #dc3545;
    font-size: 12px;
    margin-top: 4px;
    display: block;
}

/* Accessibility improvements */
.di-warranty-field input:focus {
    outline: 2px solid #0073aa;
    outline-offset: 2px;
}

.di-warranty-submit-btn:focus {
    outline: 2px solid #fff;
    outline-offset: 2px;
}

/* Print styles */
@media print {
    .di-warranty-form-container {
        box-shadow: none;
        border: 1px solid #000;
    }
    
    .di-warranty-submit-btn {
        display: none;
    }
}

