/**
 * Warranty Claim Form Styles
 * 
 * @package IonmaraWarranty
 * @version 1.0.0
 */

.ionmara-warranty-claim {
    max-width: 800px;
    margin: 0 auto;
    padding: 20px;
    background: #ffffff;
    min-height: 100vh;
}

/* Header Section */
.claim-header {
    text-align: center;
    padding: 60px 0 40px;
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    margin: -20px -20px 40px;
}

.claim-header h1 {
    font-size: 2.5rem;
    font-weight: 700;
    color: #2c3e50;
    margin-bottom: 15px;
}

.claim-header .subtitle {
    font-size: 1.1rem;
    color: #6c757d;
    margin: 0;
}

/* Form Container */
.claim-form-container {
    background: #ffffff;
    border-radius: 12px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
    padding: 40px;
    margin-bottom: 40px;
}

.claim-form {
    width: 100%;
}

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

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

.form-section h2 {
    font-size: 1.5rem;
    font-weight: 600;
    color: #2c3e50;
    margin-bottom: 25px;
    display: flex;
    align-items: center;
}

.form-section h2::before {
    content: '';
    width: 4px;
    height: 24px;
    background: #EF4136;
    margin-right: 12px;
    border-radius: 2px;
}

/* Form Layout */
.form-row {
    display: flex;
    gap: 20px;
    margin-bottom: 20px;
    flex-wrap: wrap;
}

.form-group {
    flex: 1;
    min-width: 250px;
}

.form-group.full-width {
    flex: 1 1 100%;
}

/* Form Elements */
.form-group label {
    display: block;
    font-weight: 600;
    color: #495057;
    margin-bottom: 8px;
    font-size: 0.95rem;
}

.form-group input,
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 12px 16px;
    border: 2px solid #e9ecef;
    border-radius: 8px;
    font-size: 1rem;
    transition: all 0.3s ease;
    background: #ffffff;
}

.claim-form-container .ionmara-phone-group {
    display: flex;
    gap: 10px;
    align-items: flex-start;
}

.claim-form-container .ionmara-phone-code {
    flex: 0 0 200px;
    position: relative;
}

.claim-form-container .ionmara-phone-number {
    flex: 1;
}

.claim-form-container .ionmara-phone-code .error-message,
.claim-form-container .ionmara-phone-number .error-message {
    display: block;
    color: #dc3545;
    font-size: 0.85rem;
    margin-top: 6px;
    font-weight: 500;
}

@media (max-width: 480px) {
    .claim-form-container .ionmara-phone-group {
        flex-direction: column;
        gap: 10px;
    }

    .claim-form-container .ionmara-phone-code {
        flex: 1 1 auto;
    }
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    outline: none;
    border-color: #EF4136;
    box-shadow: 0 0 0 3px rgba(239, 65, 54, 0.1);
}

.form-group input.error,
.form-group select.error,
.form-group textarea.error {
    border-color: #dc3545;
    background: #fff5f5;
}

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

/* File Upload */
.file-upload-wrapper {
    position: relative;
}

.file-upload-wrapper input[type="file"] {
    position: absolute;
    opacity: 0;
    width: 100%;
    height: 100%;
    cursor: pointer;
}

.file-upload-label {
    display: flex;
    align-items: center;
    padding: 16px;
    border: 2px dashed #dee2e6;
    border-radius: 8px;
    background: #f8f9fa;
    cursor: pointer;
    transition: all 0.3s ease;
    min-height: 60px;
}

.file-upload-label:hover {
    border-color: #EF4136;
    background: #fff5f5;
}

.file-upload-label.has-file {
    border-color: #28a745;
    background: #f8fff9;
}

.upload-icon {
    font-size: 1.5rem;
    margin-right: 12px;
}

.upload-text {
    color: #6c757d;
    flex: 1;
}

.file-name {
    color: #28a745;
    font-weight: 600;
    margin-left: 10px;
}

/* Help Text */
.form-help {
    display: block;
    color: #6c757d;
    font-size: 0.85rem;
    margin-top: 6px;
    margin-bottom: 0;
}

/* Error Messages */
.error-message {
    display: block;
    color: #dc3545;
    font-size: 0.85rem;
    margin-top: 6px;
    font-weight: 500;
}

/* Checkbox Groups */
.checkbox-group {
    margin-bottom: 20px;
}

.checkbox-label {
    display: flex;
    align-items: flex-start;
    cursor: pointer;
    font-size: 0.95rem;
    line-height: 1.5;
    color: #495057;
    margin-bottom: 12px;
}

.checkbox-label input[type="checkbox"] {
    position: absolute;
    opacity: 0;
    cursor: pointer;
}

.checkmark {
    min-width: 20px;
    height: 20px;
    background: #ffffff;
    border: 2px solid #dee2e6;
    border-radius: 4px;
    margin-right: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    flex-shrink: 0;
    margin-top: 2px;
}

.checkbox-label input[type="checkbox"]:checked ~ .checkmark {
    background: #EF4136;
    border-color: #EF4136;
}

.checkbox-label input[type="checkbox"]:checked ~ .checkmark::after {
    content: '✓';
    color: white;
    font-size: 12px;
    font-weight: bold;
}

.checkbox-label:hover .checkmark {
    border-color: #EF4136;
}

.policy-link {
    margin-top: 10px;
}

.policy-link a {
    color: #EF4136;
    text-decoration: none;
    font-weight: 500;
}

.policy-link a:hover {
    text-decoration: underline;
}

/* Submit Section */
.submit-section {
    text-align: center;
    padding-top: 30px;
    border-top: 1px solid #e9ecef;
}

.submit-btn {
    background: #EF4136;
    color: white;
    border: none;
    padding: 16px 40px;
    font-size: 1.1rem;
    font-weight: 600;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
    min-width: 250px;
}

.submit-btn:hover:not(:disabled) {
    background: #d6341f;
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(239, 65, 54, 0.3);
}

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

.btn-loading {
    display: flex;
    align-items: center;
    justify-content: center;
}

.spinner {
    width: 20px;
    height: 20px;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-top: 2px solid white;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin-right: 0;
    margin-left: 10px;
}

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

.form-note {
    color: #6c757d;
    font-size: 0.9rem;
    margin-top: 15px;
    margin-bottom: 0;
}

/* Message Containers */
.message-container {
    background: white;
    border-radius: 12px;
    padding: 40px;
    text-align: center;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
    margin-bottom: 40px;
}

.message-icon {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 25px;
    font-size: 2.5rem;
    font-weight: bold;
}

.success .message-icon {
    background: #d4edda;
    color: #28a745;
}

.error .message-icon {
    background: #f8d7da;
    color: #dc3545;
}

.message-container h2 {
    font-size: 1.8rem;
    font-weight: 700;
    color: #2c3e50;
    margin-bottom: 20px;
}

.success h2 {
    color: #155724;
}

.error h2 {
    color: #721c24;
}

/* Claim Details */
.claim-details {
    background: #f8f9fa;
    border-radius: 8px;
    padding: 25px;
    margin: 30px 0;
    text-align: left;
}

.detail-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 0;
    border-bottom: 1px solid #e9ecef;
}

.detail-item:last-child {
    border-bottom: none;
}

.detail-item strong {
    color: #495057;
    font-weight: 600;
}

.detail-item span {
    color: #2c3e50;
    font-weight: 500;
}

/* Action Buttons */
.action-buttons {
    display: flex;
    gap: 15px;
    justify-content: center;
    flex-wrap: wrap;
}

.btn {
    padding: 12px 30px;
    border: none;
    border-radius: 8px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    text-decoration: none;
    display: inline-block;
}

.btn-primary {
    background: #EF4136;
    color: white;
}

.btn-primary:hover {
    background: #d6341f;
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(239, 65, 54, 0.3);
}

.btn-secondary {
    background: #6c757d;
    color: white;
}

.btn-secondary:hover {
    background: #5a6268;
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(108, 117, 125, 0.3);
}

.btn-outline {
    background: transparent;
    color: #6c757d;
    border: 2px solid #6c757d;
}

.btn-outline:hover {
    background: #6c757d;
    color: white;
    transform: translateY(-2px);
}

/* Error Suggestions */
.error-suggestions {
    background: #fff3cd;
    border: 1px solid #ffeaa7;
    border-radius: 8px;
    padding: 20px;
    margin: 25px 0;
    text-align: left;
}

.error-suggestions h3 {
    color: #856404;
    font-size: 1.1rem;
    margin-bottom: 15px;
}

.error-suggestions ul {
    margin: 0;
    padding-left: 20px;
}

.error-suggestions li {
    color: #856404;
    margin-bottom: 8px;
}

.error-suggestions li:last-child {
    margin-bottom: 0;
}

/* Responsive Design */
@media (max-width: 768px) {
    .ionmara-warranty-claim {
        padding: 15px;
    }
    
    .claim-header {
        padding: 40px 0 30px;
        margin: -15px -15px 30px;
    }
    
    .claim-header h1 {
        font-size: 2rem;
    }
    
    .claim-form-container,
    .message-container {
        padding: 25px;
    }
    
    .form-row {
        flex-direction: column;
        gap: 0;
        margin-bottom: 0px;
    }
    
    .form-group {
        min-width: auto;
        margin-bottom: 0px;
    }
    
    .form-section h2 {
        font-size: 1.3rem;
    }
    
    .submit-btn {
        width: 100%;
        min-width: auto;
    }
    
    .action-buttons {
        flex-direction: column;
    }
    
    .btn {
        width: 100%;
        text-align: center;
    }
    
    .claim-details {
        padding: 20px;
    }
    
    .detail-item {
        flex-direction: column;
        align-items: flex-start;
        gap: 5px;
    }
    
    .detail-item strong {
        font-size: 0.9rem;
    }
    
    .detail-item span {
        font-size: 1rem;
    }
}

@media (max-width: 480px) {
    .claim-header h1 {
        font-size: 1.8rem;
    }
    
    .claim-form-container,
    .message-container {
        padding: 20px;
    }
    
    .form-section {
        margin-bottom: 30px;
        padding-bottom: 20px;
    }
    
    .form-group input,
    .form-group select,
    .form-group textarea {
        padding: 10px 14px;
    }
    
    .submit-btn {
        padding: 14px 30px;
        font-size: 1rem;
    }
}

/* Select2 Custom Styling */
.select2-container--default .select2-selection--single {
    height: 40px;
    padding: 3px 12px;
    border: 1px solid #dee2e6;
    border-radius: 3px;
    background-color: #fff;
    box-shadow: 0px 1px 2px 0px rgba(0,0,0,0.05);
}

.claim-form-container #claim-country + .select2-container--default .select2-selection--single {
    height: 48px;
    padding: 8px 12px;
    border: 2px solid #e9ecef;
    border-radius: 8px;
    background-color: #fff;
    box-shadow: none;
}

.claim-form-container #claim-country + .select2-container--default .select2-selection--single .select2-selection__rendered {
    line-height: 22px !important;
    padding-left: 0;
}

.claim-form-container #claim-country + .select2-container--default .select2-selection--single .select2-selection__arrow {
    height: 44px;
    right: 10px;
}

.claim-form-container #claim-country + .select2-container--default.select2-container--focus .select2-selection--single {
    border-color: #dc3545;
    box-shadow: 0 0 0 3px rgba(220, 53, 69, 0.1);
}

#select2-claim-country-results .select2-results__option--highlighted[aria-selected] {
    background-color: #dc3545;
    color: #fff;
}

#select2-claim-country-results .select2-results__option[aria-selected=true] {
    background-color: #fce4ec;
    color: #2c3e50;
}

.select2-container--default .select2-selection--single .select2-selection__rendered {
    line-height: 22px !important;
    color: #495057;
    padding-left: 0;
}

.select2-container--default .select2-selection--single .select2-selection__arrow {
    height: 46px;
    right: 10px;
}

.select2-container--default .select2-selection--single .select2-selection__placeholder {
    color: #6c757d;
}

.select2-container--default.select2-container--focus .select2-selection--single {
    border-color: #3498db;
    box-shadow: 0 0 0 3px rgba(52, 152, 219, 0.1);
}

.select2-dropdown {
    border: 1px solid #dee2e6;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.select2-container--default .select2-search--dropdown .select2-search__field {
    padding: 10px 12px;
    border: 1px solid #dee2e6;
    border-radius: 6px;
    font-size: 14px;
}

.select2-container--default .select2-search--dropdown .select2-search__field:focus {
    border-color: #3498db;
    outline: none;
}

.select2-container--default .select2-results__option {
    padding: 10px 12px;
    font-size: 14px;
}

.select2-container--default .select2-results__option--highlighted[aria-selected] {
    background-color: #3498db;
    color: #fff;
}

.select2-container--default .select2-results__option[aria-selected=true] {
    background-color: #e8f4fc;
    color: #2c3e50;
}

.select2-container--default .select2-results__group {
    padding: 8px 12px;
    font-weight: 600;
    color: #2c3e50;
    background-color: #f8f9fa;
    font-size: 13px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

 .ionmara-phonecode-option {
     display: inline-flex;
     align-items: center;
     gap: 10px;
 }

 .ionmara-phonecode-option .ionmara-flag {
     width: 18px;
     height: 14px;
     object-fit: cover;
     border-radius: 2px;
     flex: 0 0 auto;
 }
