/* Frontend CSS for Eras Check Warranty Plugin */

.ecw-warranty-form-container,
.ecw-warranty-check-container {
    margin: 0 auto;
    background: #fff;
    padding: 30px;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.ecw-form-header {
    text-align: center;
    margin-bottom: 30px;
    padding-bottom: 20px;
    border-bottom: 2px solid #f0f0f0;
}

.ecw-form-header h3 {
    color: #333;
    margin-bottom: 10px;
    font-size: 24px;
}

.ecw-form-header p {
    color: #666;
    font-size: 16px;
    margin: 0;
}

.ecw-form-section {
    margin-bottom: 30px;
    padding: 20px;
    background: #f9f9f9;
    border-radius: 6px;
}

.ecw-form-section h4 {
    color: #333;
    margin-bottom: 20px;
    font-size: 18px;
    border-bottom: 1px solid #e0e0e0;
    padding-bottom: 10px;
}

.ecw-form-row {
    display: flex;
    gap: 20px;
    margin-bottom: 20px;
}

.ecw-form-row .ecw-form-group {
    flex: 1;
}

.ecw-form-group {
    margin-bottom: 20px;
}

.ecw-form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    color: #333;
}

.required {
    color: #e74c3c;
}

.ecw-form-control {
    width: 100%;
    padding: 12px 15px;
    border: 2px solid #e0e0e0;
    border-radius: 6px;
    font-size: 16px;
    transition: border-color 0.3s ease;
    box-sizing: border-box;
}

.ecw-form-control:focus {
    border-color: #3498db;
    outline: none;
    box-shadow: 0 0 0 3px rgba(52, 152, 219, 0.1);
}

.ecw-input-group {
    display: flex;
    gap: 10px;
}

.ecw-input-group .ecw-form-control {
    flex: 1;
}

.ecw-help-text {
    display: block;
    margin-top: 5px;
    color: #666;
    font-size: 14px;
}

.ecw-image-preview {
    margin-top: 15px;
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.preview-item {
    position: relative;
    display: inline-block;
}

.preview-item img {
    width: 100px;
    height: 100px;
    object-fit: cover;
    border-radius: 6px;
    border: 2px solid #e0e0e0;
}

.remove-preview {
    position: absolute;
    top: -5px;
    right: -5px;
    width: 20px;
    height: 20px;
    background: #e74c3c;
    color: white;
    border-radius: 50%;
    text-align: center;
    line-height: 18px;
    cursor: pointer;
    font-size: 12px;
}

.ecw-btn {
    display: inline-block;
    border: none;
    border-radius: 6px;
    font-size: 16px;
    font-weight: 600;
    text-decoration: none;
    cursor: pointer;
    transition: all 0.3s ease;
}

.ecw-btn-primary {
    background: #3498db;
    color: white;
    margin-bottom: 0;

}

.ecw-btn-primary:hover {
    background: #2980b9;
    transform: translateY(-1px);
}

.ecw-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none !important;
}

.ecw-form-actions {
    text-align: center;
    margin-top: 30px;
}

.ecw-form-result {
    margin-top: 30px;
}

.ecw-success,
.ecw-error {
    padding: 20px;
    border-radius: 6px;
    margin-bottom: 20px;
}

.ecw-success {
    background: #d4edda;
    border: 1px solid #c3e6cb;
    color: #155724;
}

.ecw-error {
    background: #f8d7da;
    border: 1px solid #f5c6cb;
    color: #721c24;
}

.ecw-success h4,
.ecw-error h4 {
    margin-top: 0;
    margin-bottom: 10px;
}

/* Warranty Check Results */
.ecw-warranty-info {
    margin-top: 30px;
    padding: 20px;
    background: #f8f9fa;
    border-radius: 8px;
    border: 1px solid #e9ecef;
}

.ecw-warranty-info h4 {
    color: #333;
    margin-bottom: 20px;
    font-size: 20px;
    text-align: center;
}

.warranty-details {
    display: grid;
    gap: 20px;
}

.basic-info,
.status-info {
    background: white;
    padding: 20px;
    border-radius: 6px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.status-info h5 {
    margin-top: 0;
    margin-bottom: 15px;
    color: #333;
    font-size: 16px;
    border-bottom: 1px solid #e0e0e0;
    padding-bottom: 8px;
}

.ecw-info-table {
    width: 100%;
    border-collapse: collapse;
}

.ecw-info-table th,
.ecw-info-table td {
    padding: 12px 15px;
    text-align: left;
    border-bottom: 1px solid #e0e0e0;
}

.ecw-info-table th {
    background: #f8f9fa;
    font-weight: 600;
    color: #333;
    width: 30%;
}

.ecw-info-table td {
    color: #555;
}

.status-badge {
    display: inline-block;
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
}

.status-chua_tiep_nhan {
    background: #ffeaa7;
    color: #f39c12;
}

.status-da_tiep_nhan {
    background: #a8e6cf;
    color: #27ae60;
}

.status-chua_xu_ly {
    background: #fab1a0;
    color: #e17055;
}

.status-dang_xu_ly {
    background: #74b9ff;
    color: #0984e3;
}

.status-da_xu_ly {
    background: #00b894;
    color: white;
}

.warranty-images {
    margin-top: 20px;
    background: white;
    padding: 20px;
    border-radius: 6px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.warranty-images h4 {
    margin-top: 0;
    margin-bottom: 15px;
    color: #333;
    font-size: 16px;
}

.image-gallery {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.image-gallery img {
    width: 150px;
    height: 150px;
    object-fit: cover;
    border-radius: 6px;
    border: 2px solid #e0e0e0;
    cursor: pointer;
    transition: transform 0.3s ease;
}

.image-gallery img:hover {
    transform: scale(1.05);
    border-color: #3498db;
}

/* Warranty Result Page Styles */
.ecw-warranty-result-container {
    max-width: 1170px;
    margin: 0 auto;
    margin-left: -15px;
    margin-right: -15px;
}

.ecw-search-section {
    background: #fff;
    padding: 30px;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    margin-bottom: 30px;
}

.ecw-search-form .ecw-search-group {
    max-width: 600px;
    margin: 0 auto;
}

.ecw-result-display {
    margin-top: 30px;
}

.ecw-result-row {
    display: grid;
    grid-template-columns: 7fr 5fr;
    gap: 20px;
}

@media (max-width: 768px) {
    .ecw-result-row {
        grid-template-columns: 1fr;
        gap: 20px;
    }
    .ecw-warranty-result-container {
        margin-left: 0;
        margin-right: 0;
    }
}

.ecw-card {
    background: #fff;
    border-radius: 8px;
    border: 1px solid #e0e0e0;
    margin-bottom: 20px;
    overflow: hidden;
}

.ecw-card-header {
    background: #2c3e50;
    color: #fff;
    padding: 15px 20px;
    border-bottom: 1px solid #e0e0e0;
}

.ecw-card-header h4 {
    margin: 0;
    font-size: 16px;
    font-weight: 600;
    color: #fff;
}

.ecw-card-body {
    padding: 20px;
}

.ecw-info-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 15px;
}

.ecw-info-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.ecw-info-item {
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.ecw-info-item label {
    font-weight: 600;
    color: #555;
    font-size: 14px;
}

.ecw-info-item span,
.ecw-info-item div {
    color: #333;
    font-size: 14px;
    line-height: 1.5;
}

.ecw-status-badge {
    display: inline-block;
    padding: 4px 12px;
    border-radius: 4px;
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
}

.ecw-status-badge.status-chua_tiep_nhan {
    background: #f8d7da;
    color: #721c24;
}

.ecw-status-badge.status-da_tiep_nhan {
    background: #d4edda;
    color: #155724;
}

.ecw-status-badge.status-chua_xu_ly {
    background: #fff3cd;
    color: #856404;
}

.ecw-status-badge.status-dang_xu_ly {
    background: #cce7ff;
    color: #004085;
}

.ecw-status-badge.status-da_xu_ly {
    background: #d4edda;
    color: #155724;
}

.ecw-image-gallery {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
    gap: 10px;
    margin-top: 10px;
}

.ecw-image-item {
    position: relative;
    aspect-ratio: 1;
    overflow: hidden;
    border-radius: 4px;
    border: 1px solid #e0e0e0;
}

.ecw-image-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    cursor: pointer;
    transition: transform 0.2s ease;
}

.ecw-image-item img:hover {
    transform: scale(1.05);
}

.ecw-no-data {
    color: #999;
    font-style: italic;
    font-size: 13px;
}

.ecw-alert {
    padding: 20px;
    border-radius: 8px;
    margin-top: 20px;
}

.ecw-alert h4 {
    margin: 0 0 10px 0;
    font-size: 18px;
}

.ecw-alert p {
    margin: 0;
    font-size: 14px;
}

.ecw-alert-warning {
    background: #fff3cd;
    border: 1px solid #ffeaa7;
    color: #856404;
}

.ecw-alert-error {
    background: #f8d7da;
    border: 1px solid #f5c6cb;
    color: #721c24;
}

.ecw-input-group #warranty_code_result {
    flex: 1;
    padding: 12px 15px;
    border: 2px solid #e0e0e0;
    border-radius: 6px;
    font-size: 16px;
    transition: border-color 0.3s ease;
    margin-bottom: 0;
    height: 100%;
}

/* Enhanced card styles for different types */
.ecw-card-general-info .ecw-card-header {
    background: #3498db;
}

.ecw-card-process-info .ecw-card-header {
    background: #27ae60;
}

.ecw-card-product-info .ecw-card-header {
    background: #e67e22;
}

/* Responsive Design */
@media (max-width: 768px) {
    .ecw-warranty-form-container,
    .ecw-warranty-check-container {
        margin: 10px;
        padding: 20px;
    }
    
    .ecw-form-row {
        flex-direction: column;
        gap: 0;
    }
    
    .ecw-input-group {
        flex-direction: column;
    }
    
    .image-gallery img {
        width: 120px;
        height: 120px;
    }
    
    .ecw-info-table th,
    .ecw-info-table td {
        padding: 8px 10px;
        font-size: 14px;
    }
    
    .ecw-info-table th {
        width: 40%;
    }
}

/* responsive small devices */
@media (max-width: 576px) {
    .ecw-info-grid {
        grid-template-columns: 1fr;
    }
}
