/* Vehicle Warranty Checker - Frontend Styles */

/* Wrapper */
.vwc-wrapper {
    max-width: 600px;
    margin: 40px auto;
    padding: 0 20px;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen-Sans, Ubuntu, Cantarell, sans-serif;
}

/* Form Container */
.vwc-form-container {
    background: #ffffff;
    border-radius: 16px;
    padding: 40px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.1);
}

/* Form Groups */
.vwc-form-group {
    margin-bottom: 24px;
}

.vwc-form-group label {
    display: block;
    font-size: 15px;
    font-weight: 600;
    color: #374151;
    margin-bottom: 8px;
}

.vwc-form-group .required {
    color: #ef4444;
    margin-left: 2px;
}

.vwc-form-group input {
    width: 100%;
    padding: 14px 18px;
    font-size: 15px;
    border: 2px solid #e5e7eb;
    border-radius: 10px;
    transition: all 0.3s ease;
    background: #fff;
    box-sizing: border-box;
}

.vwc-form-group input:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

.vwc-form-group input::placeholder {
    color: #9ca3af;
}

/* Submit Button */
.vwc-form-actions {
    margin-top: 32px;
}

.vwc-submit-btn {
    width: 100%;
    padding: 16px 24px;
    font-size: 16px;
    font-weight: 700;
    color: #ffffff;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border: none;
    border-radius: 10px;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.4);
    position: relative;
    overflow: hidden;
}

.vwc-submit-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(102, 126, 234, 0.5);
}

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

.vwc-submit-btn:disabled {
    opacity: 0.7;
    cursor: not-allowed;
}

.vwc-btn-spinner {
    display: inline-block;
    width: 16px;
    height: 16px;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-top-color: #fff;
    border-radius: 50%;
    animation: vwc-spin 0.8s linear infinite;
    margin-right: 8px;
    vertical-align: middle;
}

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

/* Modal Overlay */
.vwc-modal-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.75);
    z-index: 999999;
    animation: vwcFadeIn 0.3s ease;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.vwc-modal-overlay.active {
    display: flex !important;
}

@keyframes vwcFadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

/* Modal */
.vwc-modal {
    background: #fff;
    border-radius: 20px;
    max-width: 700px;
    width: 100%;
    max-height: 90vh;
    overflow: hidden;
    box-shadow: 0 25px 80px rgba(0, 0, 0, 0.4);
    animation: vwcSlideUp 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes vwcSlideUp {
    from {
        opacity: 0;
        transform: translateY(50px) scale(0.95);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

/* Modal Header */
.vwc-modal-header {
    padding: 30px 40px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.vwc-modal-header h2 {
    margin: 0;
    font-size: 24px;
    font-weight: 700;
    color: #ffffff;
}

.vwc-modal-close {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.2);
    border: none;
    color: #fff;
    font-size: 28px;
    line-height: 1;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0;
}

.vwc-modal-close:hover {
    background: rgba(255, 255, 255, 0.3);
    transform: rotate(90deg);
}

/* Modal Body */
.vwc-modal-body {
    padding: 40px;
    max-height: calc(90vh - 200px);
    overflow-y: auto;
}

.vwc-modal-body::-webkit-scrollbar {
    width: 8px;
}

.vwc-modal-body::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 4px;
}

.vwc-modal-body::-webkit-scrollbar-thumb {
    background: #667eea;
    border-radius: 4px;
}

.vwc-modal-body::-webkit-scrollbar-thumb:hover {
    background: #764ba2;
}

/* Modal Loading */
.vwc-modal-loading {
    text-align: center;
    padding: 60px 30px;
}

.vwc-spinner {
    width: 60px;
    height: 60px;
    margin: 0 auto 24px;
    border: 4px solid #f3f3f3;
    border-top: 4px solid #667eea;
    border-radius: 50%;
    animation: vwc-spin 1s linear infinite;
}

.vwc-modal-loading p {
    font-size: 16px;
    color: #6b7280;
    margin: 0;
}

/* Result Content */
.vwc-result-content {
    animation: vwcFadeIn 0.5s ease;
}

/* Result Grid - 2 columns */
.vwc-result-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 16px 20px;
    margin-bottom: 24px;
}

.vwc-result-item {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.vwc-result-item.full-width {
    grid-column: 1 / -1;
}

.vwc-result-label {
    font-size: 12px;
    font-weight: 600;
    color: #9ca3af;
    text-transform: uppercase;
    letter-spacing: 0.3px;
}

.vwc-result-value {
    font-size: 15px;
    color: #1f2937;
    font-weight: 500;
    word-break: break-word;
}

.vwc-result-value.empty {
    color: #d1d5db;
    font-style: italic;
}

.vwc-result-value code {
    background: #f3f4f6;
    padding: 4px 10px;
    border-radius: 6px;
    font-family: 'Courier New', monospace;
    font-size: 14px;
    font-weight: 600;
    color: #667eea;
}

/* Warranty Status */
.vwc-warranty-status {
    margin-top: 24px;
    padding: 20px;
    background: linear-gradient(135deg, #f9fafb 0%, #ffffff 100%);
    border-radius: 12px;
    border: 2px solid #e5e7eb;
}

.vwc-warranty-status-title {
    font-size: 13px;
    font-weight: 700;
    color: #6b7280;
    margin-bottom: 12px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.vwc-warranty-status-info {
    display: flex;
    align-items: center;
    gap: 14px;
}

.vwc-status-icon {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    flex-shrink: 0;
}

.vwc-warranty-status-info.valid .vwc-status-icon {
    background: linear-gradient(135deg, #48bb78 0%, #38a169 100%);
    color: #fff;
    box-shadow: 0 4px 12px rgba(72, 187, 120, 0.3);
}

.vwc-warranty-status-info.expired .vwc-status-icon {
    background: linear-gradient(135deg, #f56565 0%, #e53e3e 100%);
    color: #fff;
    box-shadow: 0 4px 12px rgba(245, 101, 101, 0.3);
}

.vwc-warranty-status-info.pending .vwc-status-icon {
    background: linear-gradient(135deg, #ed8936 0%, #dd6b20 100%);
    color: #fff;
    box-shadow: 0 4px 12px rgba(237, 137, 54, 0.3);
}

.vwc-status-details {
    flex: 1;
}

.vwc-status-text {
    font-size: 18px;
    font-weight: 700;
    margin-bottom: 4px;
}

.vwc-warranty-status-info.valid .vwc-status-text {
    color: #38a169;
}

.vwc-warranty-status-info.expired .vwc-status-text {
    color: #e53e3e;
}

.vwc-warranty-status-info.pending .vwc-status-text {
    color: #dd6b20;
}

.vwc-status-expiry {
    font-size: 13px;
    color: #6b7280;
}

/* Error Message */
.vwc-error-message {
    text-align: center;
    padding: 40px 30px;
}

.vwc-error-icon {
    font-size: 64px;
    color: #ef4444;
    margin-bottom: 20px;
}

.vwc-error-text {
    font-size: 18px;
    color: #1f2937;
    font-weight: 600;
    margin-bottom: 8px;
}

.vwc-error-desc {
    font-size: 14px;
    color: #6b7280;
}

/* Modal Footer */
.vwc-modal-footer {
    padding: 20px 40px;
    border-top: 1px solid #e5e7eb;
    text-align: right;
}

.vwc-modal-btn {
    padding: 12px 28px;
    border-radius: 8px;
    font-weight: 600;
    border: none;
    cursor: pointer;
    font-size: 15px;
    transition: all 0.3s ease;
    background: #f3f4f6;
    color: #374151;
}

.vwc-modal-btn:hover {
    background: #e5e7eb;
}

/* Responsive */
@media (max-width: 768px) {
    .vwc-wrapper {
        margin: 20px auto;
    }
    
    .vwc-form-container {
        padding: 30px 24px;
        border-radius: 12px;
    }
    
    .vwc-modal {
        border-radius: 16px;
        margin: 10px;
    }
    
    .vwc-modal-header {
        padding: 24px;
    }
    
    .vwc-modal-header h2 {
        font-size: 20px;
    }
    
    .vwc-modal-body {
        padding: 24px;
    }
    
    .vwc-modal-footer {
        padding: 16px 24px;
    }
    
    .vwc-result-grid {
        grid-template-columns: 1fr;
        gap: 14px;
    }
    
    .vwc-warranty-status {
        padding: 18px;
    }
    
    .vwc-status-icon {
        width: 44px;
        height: 44px;
        font-size: 22px;
    }
    
    .vwc-status-text {
        font-size: 16px;
    }
}

@media (max-width: 480px) {
    .vwc-form-container {
        padding: 24px 20px;
    }
    
    .vwc-form-group input {
        padding: 12px 16px;
    }
    
    .vwc-submit-btn {
        padding: 14px 20px;
        font-size: 15px;
    }
}