/**
 * Public-facing styles for the Movers Quote Plugin.
 *
 * Modern, professional styling for the multi-step quote form.
 * Responsive design with mobile-first approach.
 *
 * @since      1.0.0
 * @package    Movers_Quote_Plugin
 */

/* ==========================================================================
   Variables & Base Styles
   ========================================================================== */

:root {
    --mover-primary: #2563eb;
    --mover-primary-dark: #1e40af;
    --mover-secondary: #64748b;
    --mover-success: #10b981;
    --mover-error: #ef4444;
    --mover-warning: #f59e0b;
    --mover-border: #e2e8f0;
    --mover-bg: #ffffff;
    --mover-bg-light: #f8fafc;
    --mover-text: #1e293b;
    --mover-text-light: #64748b;
    --mover-shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.1), 0 1px 2px 0 rgba(0, 0, 0, 0.06);
    --mover-shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
    --mover-radius: 8px;
    --mover-transition: all 0.3s ease;
}

/* ==========================================================================
   Form Container
   ========================================================================== */

.mover-quote-form-container {
    max-width: 800px;
    margin: 2rem auto;
    padding: 2rem;
    background: var(--mover-bg);
    border-radius: var(--mover-radius);
    box-shadow: var(--mover-shadow-lg);
}

@media (max-width: 768px) {
    .mover-quote-form-container {
        padding: 1.5rem;
        margin: 1rem;
    }
}

/* ==========================================================================
   Progress Bar
   ========================================================================== */

.mover-progress-bar {
    margin-bottom: 2rem;
    padding: 0 1rem;
}

.mover-progress-steps {
    display: flex;
    justify-content: space-between;
    margin-bottom: 1rem;
    position: relative;
    padding: 0;
}

.mover-progress-steps::before {
    content: '';
    position: absolute;
    top: 20px;
    left: 10%;
    right: 10%;
    height: 2px;
    background: var(--mover-border);
    z-index: 0;
}

.mover-progress-step {
    flex: 1;
    text-align: center;
    position: relative;
    z-index: 1;
}

.mover-progress-step-circle {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: var(--mover-bg);
    border: 2px solid var(--mover-border);
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 0.5rem;
    font-weight: 600;
    color: var(--mover-text-light);
    transition: var(--mover-transition);
}

.mover-progress-step.active .mover-progress-step-circle {
    background: var(--mover-primary);
    border-color: var(--mover-primary);
    color: white;
}

.mover-progress-step.completed .mover-progress-step-circle {
    background: var(--mover-success);
    border-color: var(--mover-success);
    color: white;
}

.mover-progress-step-label {
    font-size: 0.875rem;
    color: var(--mover-text-light);
    font-weight: 500;
}

.mover-progress-step.active .mover-progress-step-label {
    color: var(--mover-primary);
    font-weight: 600;
}

@media (max-width: 640px) {
    .mover-progress-step-label {
        font-size: 0.75rem;
    }
    
    .mover-progress-step-circle {
        width: 32px;
        height: 32px;
        font-size: 0.875rem;
    }
}

/* ==========================================================================
   Form Steps
   ========================================================================== */

.mover-form-step {
    display: none;
    animation: fadeIn 0.3s ease-in;
    padding: 0 1rem;
}

.mover-form-step.active {
    display: block;
}

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

.mover-step-title {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--mover-text);
    margin-bottom: 1.5rem;
    padding-bottom: 1rem;
    border-bottom: 2px solid var(--mover-border);
}

/* ==========================================================================
   Form Fields
   ========================================================================== */

.mover-form-field {
    margin-bottom: 1.5rem;
}

.mover-form-label {
    display: block;
    font-weight: 600;
    color: var(--mover-text);
    margin-bottom: 0.5rem;
    font-size: 0.9375rem;
}

.mover-form-label .required {
    color: var(--mover-error);
    margin-left: 0.25rem;
}

.mover-form-input,
.mover-form-select,
.mover-form-textarea {
    width: 100%;
    padding: 0.75rem 1rem;
    border: 2px solid var(--mover-border);
    border-radius: var(--mover-radius);
    font-size: 1rem;
    color: var(--mover-text);
    background: var(--mover-bg);
    transition: var(--mover-transition);
    font-family: inherit;
}

.mover-form-input:focus,
.mover-form-select:focus,
.mover-form-textarea:focus {
    outline: none;
    border-color: var(--mover-primary);
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}

.mover-form-input.error,
.mover-form-select.error,
.mover-form-textarea.error {
    border-color: var(--mover-error);
}

.mover-form-textarea {
    resize: vertical;
    min-height: 120px;
}

.mover-field-error {
    display: block;
    color: var(--mover-error);
    font-size: 0.875rem;
    margin-top: 0.5rem;
}

.mover-field-description {
    display: block;
    color: var(--mover-text-light);
    font-size: 0.875rem;
    margin-top: 0.5rem;
}

/* ==========================================================================
   Address Fields with Map
   ========================================================================== */

.mover-address-field {
    position: relative;
}

.mover-address-suggestions {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: var(--mover-bg);
    border: 2px solid var(--mover-border);
    border-top: none;
    border-radius: 0 0 var(--mover-radius) var(--mover-radius);
    max-height: 200px;
    overflow-y: auto;
    z-index: 100;
    box-shadow: var(--mover-shadow);
}

.mover-address-suggestion {
    padding: 0.75rem 1rem;
    cursor: pointer;
    transition: var(--mover-transition);
}

.mover-address-suggestion:hover {
    background: var(--mover-bg-light);
}

.mover-map-container {
    margin-top: 1rem;
    height: 300px;
    border-radius: var(--mover-radius);
    overflow: hidden;
    border: 2px solid var(--mover-border);
}

/* ==========================================================================
   Review Step
   ========================================================================== */

.mover-review-section {
    background: var(--mover-bg-light);
    padding: 1.5rem;
    border-radius: var(--mover-radius);
    margin-bottom: 1.5rem;
}

.mover-review-section h3 {
    font-size: 1.125rem;
    font-weight: 600;
    color: var(--mover-text);
    margin-bottom: 1rem;
    padding-bottom: 0.5rem;
    border-bottom: 1px solid var(--mover-border);
}

.mover-review-item {
    display: flex;
    justify-content: space-between;
    padding: 0.75rem 0;
    border-bottom: 1px solid var(--mover-border);
}

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

.mover-review-label {
    font-weight: 600;
    color: var(--mover-text-light);
}

.mover-review-value {
    color: var(--mover-text);
    text-align: right;
    max-width: 60%;
}

/* ==========================================================================
   Form Navigation
   ========================================================================== */

.mover-form-navigation {
    display: flex;
    justify-content: space-between;
    gap: 1rem;
    margin-top: 2rem;
    padding: 2rem 1rem 0 1rem;
    border-top: 2px solid var(--mover-border);
}

.mover-btn {
    padding: 0.875rem 2rem;
    border: none;
    border-radius: var(--mover-radius);
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: var(--mover-transition);
    font-family: inherit;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
}

.mover-btn-primary {
    background: var(--mover-primary);
    color: white;
}

.mover-btn-primary:hover {
    background: var(--mover-primary-dark);
    transform: translateY(-1px);
    box-shadow: var(--mover-shadow);
}

.mover-btn-primary:disabled {
    background: var(--mover-secondary);
    cursor: not-allowed;
    transform: none;
}

.mover-btn-secondary {
    background: var(--mover-bg-light);
    color: var(--mover-text);
    border: 2px solid var(--mover-border);
}

.mover-btn-secondary:hover {
    background: var(--mover-border);
}

.mover-btn-prev {
    margin-right: auto;
}

.mover-btn-next,
.mover-btn-submit {
    margin-left: auto;
}

@media (max-width: 640px) {
    .mover-btn {
        padding: 0.75rem 1.5rem;
        font-size: 0.9375rem;
    }
}

/* ==========================================================================
   Messages
   ========================================================================== */

#mover-message-container {
    padding: 0 1rem;
}

.mover-message {
    padding: 1rem 1.25rem;
    border-radius: var(--mover-radius);
    margin-bottom: 1.5rem;
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.mover-message-success {
    background: #d1fae5;
    color: #065f46;
    border: 1px solid #10b981;
}

.mover-message-error {
    background: #fee2e2;
    color: #991b1b;
    border: 1px solid #ef4444;
}

.mover-message-warning {
    background: #fef3c7;
    color: #92400e;
    border: 1px solid #f59e0b;
}

.mover-message-icon {
    font-size: 1.25rem;
}

/* ==========================================================================
   Loading State
   ========================================================================== */

.mover-loading {
    display: none;
    text-align: center;
    padding: 2rem;
}

.mover-loading.active {
    display: block;
}

.mover-spinner {
    border: 4px solid var(--mover-border);
    border-top: 4px solid var(--mover-primary);
    border-radius: 50%;
    width: 50px;
    height: 50px;
    animation: spin 1s linear infinite;
    margin: 0 auto 1rem;
}

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

/* ==========================================================================
   Utilities
   ========================================================================== */

.mover-hidden {
    display: none !important;
}

.mover-text-center {
    text-align: center;
}

.mover-mt-1 {
    margin-top: 0.5rem;
}

.mover-mt-2 {
    margin-top: 1rem;
}

.mover-mb-1 {
    margin-bottom: 0.5rem;
}

.mover-mb-2 {
    margin-bottom: 1rem;
}

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

@media (max-width: 640px) {
    #mover-message-container {
        padding: 0 0.5rem;
    }
    
    .mover-progress-bar {
        padding: 0 0.5rem;
    }
    
    .mover-form-step {
        padding: 0 0.5rem;
    }
    
    .mover-form-navigation {
        flex-direction: column;
        padding: 2rem 0.5rem 0 0.5rem;
    }
    
    .mover-btn-prev,
    .mover-btn-next,
    .mover-btn-submit {
        width: 100%;
        margin: 0;
        justify-content: center;
    }
    
    .mover-review-item {
        flex-direction: column;
        gap: 0.25rem;
    }
    
    .mover-review-value {
        text-align: left;
        max-width: 100%;
    }
}

/* ==========================================================================
   Accessibility
   ========================================================================== */

.mover-sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border-width: 0;
}

.mover-form-input:focus-visible,
.mover-form-select:focus-visible,
.mover-form-textarea:focus-visible,
.mover-btn:focus-visible {
    outline: 2px solid var(--mover-primary);
    outline-offset: 2px;
}

/* ==========================================================================
   Confirmation Panel
   ========================================================================== */

.mover-confirmation-panel {
    text-align: center;
    padding: 60px 40px;
    background: linear-gradient(135deg, #f8fff8 0%, #e8f5e9 100%);
    border-radius: 12px;
    border: 1px solid #c8e6c9;
}

.mover-confirmation-icon {
    width: 80px;
    height: 80px;
    margin: 0 auto 24px;
    background-color: #4caf50;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 12px rgba(76, 175, 80, 0.3);
}

.mover-confirmation-icon .mover-checkmark {
    color: #ffffff;
    font-size: 40px;
    line-height: 1;
}

.mover-confirmation-title {
    font-size: 28px;
    font-weight: 600;
    color: #2e7d32;
    margin: 0 0 16px;
}

.mover-confirmation-message {
    font-size: 16px;
    color: #555555;
    line-height: 1.6;
    max-width: 500px;
    margin: 0 auto 32px;
}

#mover-new-request-btn {
    margin-top: 8px;
}
