/**
 * Sorooshan Warranty Check - Styles
 * 
 * Professional styling for warranty verification form
 * 
 * @package SorooshanIntegration
 * @version 1.0.0
 */

/* ============================================
   Warranty Check Form Container
   ============================================ */

.sorooshan-warranty-check-wrapper {
    max-width: 600px;
    margin: 30px auto;
    padding: 30px;
    background: #ffffff;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.sorooshan-warranty-form {
    width: 100%;
}

/* ============================================
   Form Rows
   ============================================ */

.sorooshan-warranty-form .form-row {
    margin-bottom: 20px;
}

.sorooshan-warranty-form .form-row:last-of-type {
    margin-bottom: 0;
}

.sorooshan-warranty-form label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    color: #333333;
    font-size: 14px;
}

/* ============================================
   Input Fields
   ============================================ */

.sorooshan-warranty-form input[type="text"] {
    width: 100%;
    padding: 12px 15px;
    border: 2px solid #e0e0e0;
    border-radius: 5px;
    font-size: 15px;
    transition: all 0.3s ease;
    box-sizing: border-box;
}

.sorooshan-warranty-form input[type="text"]:focus {
    outline: none;
    border-color: #4CAF50;
    box-shadow: 0 0 0 3px rgba(76, 175, 80, 0.1);
}

.sorooshan-warranty-form input[type="text"]::placeholder {
    color: #999999;
}

/* ============================================
   Submit Button
   ============================================ */

.sorooshan-submit-btn {
    width: 100%;
    padding: 14px 30px;
    background: linear-gradient(135deg, #4CAF50 0%, #45a049 100%);
    color: #ffffff;
    border: none;
    border-radius: 5px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.sorooshan-submit-btn:hover {
    background: linear-gradient(135deg, #45a049 0%, #3d8b40 100%);
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(76, 175, 80, 0.3);
}

.sorooshan-submit-btn:active {
    transform: translateY(0);
}

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

.sorooshan-submit-btn.loading {
    position: relative;
}

.sorooshan-submit-btn.loading::after {
    content: "";
    position: absolute;
    right: 15px;
    top: 50%;
    width: 16px;
    height: 16px;
    margin-top: -8px;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-top-color: #ffffff;
    border-radius: 50%;
    animation: spin 0.6s linear infinite;
}

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

/* ============================================
   Result Container
   ============================================ */

.sorooshan-result {
    margin-top: 30px;
}

.warranty-info {
    padding: 25px;
    border-radius: 8px;
    animation: slideIn 0.3s ease;
}

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

/* Success State */
.warranty-info.success {
    background: #f1f8f4;
    border: 2px solid #4CAF50;
}

.warranty-info.success h3 {
    color: #2e7d32;
    margin: 0 0 20px 0;
    font-size: 20px;
}

/* Error State */
.warranty-info.error {
    background: #ffebee;
    border: 2px solid #f44336;
}

.warranty-info.error p {
    color: #c62828;
    margin: 0;
    font-weight: 500;
}

/* ============================================
   Warranty Details (Flex Layout with Dots)
   ============================================ */

.warranty-details {
    width: 100%;
}

.warranty-row {
    display: flex;
    align-items: baseline;
    margin-bottom: 12px;
    font-size: 15px;
    line-height: 1.6;
}

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

.warranty-label {
    flex-shrink: 0;
    font-weight: 600;
    color: #555555;
    padding-right: 8px;
    white-space: nowrap;
}

.warranty-dots {
    flex-grow: 1;
    border-bottom: 2px dotted #d0d0d0;
    margin: 0 8px 4px 8px;
    min-width: 20px;
}

.warranty-value {
    flex-shrink: 0;
    color: #333333;
    font-weight: 500;
    padding-left: 8px;
    text-align: left;
}

/* Warranty Status Badge */
.warranty-status {
    display: inline-block;
    padding: 4px 10px !important;
    border-radius: 15px;
    font-weight: 600;
    font-size: 13px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.warranty-status.active {
    background: #4CAF50;
    color: #ffffff;
}

.warranty-status.expired {
    background: #f44336;
    color: #ffffff;
}

/* ============================================
   RTL Support (Persian/Arabic)
   ============================================ */

[dir="rtl"] .warranty-label,
body.rtl .warranty-label {
    padding-right: 0;
    padding-left: 8px;
}

[dir="rtl"] .warranty-value,
body.rtl .warranty-value {
    padding-left: 0;
    padding-right: 8px;
    text-align: right;
}

/* ============================================
   Responsive Design
   ============================================ */

@media (max-width: 768px) {
    .warranty-row {
        font-size: 14px;
    }
    
    .warranty-label {
        font-size: 13px;
    }
    
    .warranty-value {
        font-size: 14px;
    }
}

@media (max-width: 480px) {
    .warranty-row {
        flex-wrap: wrap;
    }
    
    .warranty-label {
        width: 100%;
        margin-bottom: 4px;
    }
    
    .warranty-dots {
        display: none;
    }
    
    .warranty-value {
        width: 100%;
        padding-left: 0;
        font-size: 15px;
        font-weight: 600;
    }
}

/* ============================================
   Print Styles
   ============================================ */

@media print {
    .warranty-dots {
        border-bottom-color: #999999;
    }
}