/**
 * Movixit Public Styles
 * Clean, responsive frontend styles for Movixit Global Mobility
 *
 * @package Movixit
 * @since 3.0.0
 */

/* ============================================
   1. Main Container
   ============================================ */
.movixit-public {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    line-height: 1.6;
    color: #2d3748;
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
}

.movixit-container {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
}

/* ============================================
   2. Headers
   ============================================ */
.movixit-header {
    text-align: center;
    margin-bottom: 40px;
    padding: 30px;
    background: linear-gradient(135deg, #f7fafc 0%, #edf2f7 100%);
    border-radius: 16px;
}

.movixit-header h1 {
    font-size: 32px;
    margin: 0 0 10px 0;
    color: #1a202c;
}

.movixit-header .description {
    font-size: 16px;
    color: #4a5568;
    max-width: 600px;
    margin: 0 auto;
}

.movixit-brand-header {
    text-align: center;
    margin-bottom: 30px;
    padding: 20px;
    background: linear-gradient(135deg, #1a365d 0%, #2b6cb0 100%);
    color: white;
    border-radius: 16px;
}

.movixit-brand-header h2 {
    margin: 0 0 10px;
    color: white;
}

.movixit-brand-header .description {
    color: rgba(255, 255, 255, 0.9);
}

/* ============================================
   3. Cards
   ============================================ */
.movixit-card {
    background: #fff;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    padding: 24px;
    margin-bottom: 24px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
    transition: box-shadow 0.2s;
}

.movixit-card:hover {
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.movixit-card h2 {
    margin: 0 0 20px 0;
    font-size: 24px;
    color: #1a202c;
}

.movixit-card h3 {
    margin: 15px 0 10px 0;
    font-size: 18px;
    color: #2d3748;
}

/* ============================================
   4. Forms
   ============================================ */
.movixit-form {
    max-width: 800px;
    margin: 0 auto;
}

.movixit-form-section {
    background: #fff;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    padding: 24px;
    margin-bottom: 24px;
}

.movixit-form-section h3 {
    margin-top: 0;
    margin-bottom: 20px;
    color: #1a365d;
    border-bottom: 2px solid #e2e8f0;
    padding-bottom: 10px;
}

.movixit-form-row {
    display: flex;
    gap: 20px;
    margin-bottom: 15px;
}

.movixit-form-group {
    flex: 1;
}

.movixit-form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    color: #2d3748;
}

.movixit-form-group .required {
    color: #e53e3e;
}

.movixit-input,
.movixit-select,
.movixit-textarea {
    width: 100%;
    padding: 10px 12px;
    border: 2px solid #e2e8f0;
    border-radius: 8px;
    font-size: 14px;
    transition: all 0.2s;
}

.movixit-input:focus,
.movixit-select:focus,
.movixit-textarea:focus {
    border-color: #2b6cb0;
    outline: none;
    box-shadow: 0 0 0 3px rgba(43, 108, 176, 0.1);
}

.movixit-input.error,
.movixit-select.error,
.movixit-textarea.error {
    border-color: #e53e3e;
}

.field-note {
    margin-top: 5px;
    font-size: 12px;
    color: #718096;
}

/* ============================================
   5. Buttons
   ============================================ */
.movixit-btn {
    display: inline-block;
    padding: 12px 24px;
    font-size: 14px;
    font-weight: 600;
    text-align: center;
    text-decoration: none;
    border-radius: 8px;
    border: none;
    cursor: pointer;
    transition: all 0.2s;
}

.movixit-btn-primary {
    background: #2b6cb0;
    color: #fff;
}

.movixit-btn-primary:hover {
    background: #2c5282;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(43, 108, 176, 0.3);
}

.movixit-btn-secondary {
    background: #e2e8f0;
    color: #4a5568;
}

.movixit-btn-secondary:hover {
    background: #cbd5e0;
    transform: translateY(-1px);
}

.movixit-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none !important;
}

/* ============================================
   6. Progress Bar
   ============================================ */
.movixit-progress-bar {
    display: flex;
    justify-content: space-between;
    margin-bottom: 30px;
    background: #f7fafc;
    padding: 15px 20px;
    border-radius: 12px;
}

.movixit-progress-step {
    flex: 1;
    text-align: center;
    font-size: 12px;
    color: #a0aec0;
    position: relative;
}

.movixit-progress-step.active {
    color: #2b6cb0;
    font-weight: 600;
}

.movixit-progress-step.active::before {
    content: '';
    position: absolute;
    bottom: -22px;
    left: 50%;
    transform: translateX(-50%);
    width: 10px;
    height: 10px;
    background: #2b6cb0;
    border-radius: 50%;
    border: 2px solid #fff;
    box-shadow: 0 0 0 2px #2b6cb0;
}

.movixit-progress-step.completed {
    color: #48bb78;
}

/* ============================================
   7. Form Steps
   ============================================ */
.movixit-form-step {
    display: none;
    animation: fadeIn 0.3s ease;
}

.movixit-form-step.active {
    display: block;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

.movixit-form-nav {
    display: flex;
    justify-content: space-between;
    margin-top: 25px;
    padding-top: 20px;
    border-top: 1px solid #e2e8f0;
}

/* ============================================
   8. Status Badges
   ============================================ */
.movixit-status-badge {
    display: inline-block;
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 500;
}

.movixit-status-badge.pending {
    background: #fefcbf;
    color: #975a16;
}
.movixit-status-badge.review {
    background: #bee3f8;
    color: #2c5282;
}
.movixit-status-badge.approved {
    background: #c6f6d5;
    color: #22543d;
}
.movixit-status-badge.rejected {
    background: #fed7d7;
    color: #742a2a;
}
.movixit-status-badge.submitted {
    background: #e9d8fd;
    color: #553c9a;
}

/* ============================================
   9. Risk Indicators
   ============================================ */
.movixit-risk-badge {
    display: inline-block;
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 500;
}

.movixit-risk-badge.critical {
    background: #fed7d7;
    color: #742a2a;
}
.movixit-risk-badge.high {
    background: #feebc8;
    color: #7b341e;
}
.movixit-risk-badge.medium {
    background: #fefcbf;
    color: #975a16;
}
.movixit-risk-badge.low {
    background: #c6f6d5;
    color: #22543d;
}

/* ============================================
   10. Alerts
   ============================================ */
.movixit-alert {
    padding: 15px 20px;
    margin: 20px 0;
    border-radius: 8px;
    border-left: 4px solid;
}

.movixit-alert-success {
    background: #c6f6d5;
    border-left-color: #48bb78;
    color: #22543d;
}
.movixit-alert-warning {
    background: #feebc8;
    border-left-color: #ed8936;
    color: #7b341e;
}
.movixit-alert-error {
    background: #fed7d7;
    border-left-color: #f56565;
    color: #742a2a;
}
.movixit-alert-info {
    background: #bee3f8;
    border-left-color: #4299e1;
    color: #2c5282;
}

/* ============================================
   11. Dashboard
   ============================================ */
.movixit-dashboard {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
}

.dashboard-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 30px;
}

.dashboard-header h2 {
    margin: 0;
    color: #1a365d;
}

.applications-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
    gap: 24px;
}

.application-card {
    background: #fff;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    overflow: hidden;
    transition: transform 0.2s, box-shadow 0.2s;
}

.application-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.card-header {
    padding: 15px 20px;
    background: #f7fafc;
    border-bottom: 1px solid #e2e8f0;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.app-id {
    font-weight: 600;
    color: #4a5568;
}

.app-status {
    padding: 4px 10px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
}

.card-body {
    padding: 20px;
}

.card-body h3 {
    margin: 0 0 15px;
    font-size: 16px;
    color: #2d3748;
}

.app-details {
    margin-bottom: 15px;
}

.detail {
    display: flex;
    justify-content: space-between;
    margin-bottom: 8px;
    font-size: 14px;
}

.detail .label {
    color: #718096;
}

.detail .value {
    font-weight: 600;
    color: #2d3748;
}

.card-footer {
    padding: 15px 20px;
    background: #f7fafc;
    border-top: 1px solid #e2e8f0;
    text-align: right;
}

.dashboard-empty {
    text-align: center;
    padding: 60px 20px;
    background: #fff;
    border-radius: 12px;
}

/* ============================================
   12. Status Checker
   ============================================ */
.movixit-status-container {
    max-width: 500px;
    margin: 0 auto;
    padding: 20px;
}

.movixit-status-input-group {
    display: flex;
    gap: 10px;
    margin: 20px 0;
}

.movixit-status-input {
    flex: 1;
    padding: 12px;
    border: 2px solid #e2e8f0;
    border-radius: 8px;
    font-size: 14px;
}

.movixit-status-btn {
    padding: 12px 24px;
    background: #2b6cb0;
    color: #fff;
    border: none;
    border-radius: 8px;
    cursor: pointer;
}

.movixit-status-card {
    background: #f7fafc;
    border-radius: 12px;
    padding: 20px;
    margin-top: 20px;
}

.movixit-status-error {
    padding: 15px;
    background: #fed7d7;
    color: #742a2a;
    border-radius: 8px;
    text-align: center;
}

/* ============================================
   13. Document Upload
   ============================================ */
.movixit-upload-area {
    border: 2px dashed #cbd5e0;
    border-radius: 12px;
    padding: 40px;
    text-align: center;
    background: #f7fafc;
    cursor: pointer;
    transition: all 0.2s;
}

.movixit-upload-area:hover,
.movixit-upload-area.dragover {
    border-color: #2b6cb0;
    background: #ebf8ff;
}

.upload-icon {
    margin-bottom: 15px;
    color: #a0aec0;
}

.upload-subtext {
    font-size: 12px;
    color: #a0aec0;
    margin-top: 10px;
}

.movixit-file-list {
    margin-top: 20px;
}

.movixit-file-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px;
    background: #f7fafc;
    border-radius: 8px;
    margin-bottom: 8px;
}

/* ============================================
   14. Review Section
   ============================================ */
.movixit-review-content {
    background: #f7fafc;
    padding: 20px;
    border-radius: 12px;
    margin-bottom: 20px;
}

.movixit-review-section {
    margin-bottom: 20px;
    padding-bottom: 15px;
    border-bottom: 1px solid #e2e8f0;
}

.movixit-review-section h4 {
    margin: 0 0 10px 0;
    color: #2b6cb0;
}

.movixit-review-item {
    display: flex;
    padding: 5px 0;
}

.movixit-review-label {
    width: 140px;
    font-weight: 600;
    color: #4a5568;
}

.movixit-review-value {
    flex: 1;
    color: #2d3748;
}

/* ============================================
   15. Form Checkbox
   ============================================ */
.movixit-form-checkbox {
    margin: 15px 0;
}

.movixit-form-checkbox label {
    display: flex;
    align-items: center;
    gap: 10px;
    cursor: pointer;
}

/* ============================================
   16. Success Message
   ============================================ */
.movixit-success {
    text-align: center;
    padding: 40px;
    background: #c6f6d5;
    border-radius: 12px;
    color: #22543d;
}

.movixit-success h3 {
    margin: 0 0 10px;
    color: #22543d;
}

/* ============================================
   17. Loading States
   ============================================ */
.movixit-loading {
    position: relative;
    pointer-events: none;
    opacity: 0.7;
}

.movixit-loading:after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 30px;
    height: 30px;
    border: 3px solid rgba(43, 108, 176, 0.3);
    border-radius: 50%;
    border-top-color: #2b6cb0;
    animation: spin 1s ease-in-out infinite;
}

/* ============================================
   18. Responsive Design
   ============================================ */
@media (max-width: 768px) {
    .movixit-public {
        padding: 15px;
    }
    
    .movixit-header h1 {
        font-size: 24px;
    }
    
    .movixit-form-row {
        flex-direction: column;
        gap: 12px;
    }
    
    .movixit-progress-bar {
        flex-direction: column;
        gap: 15px;
        align-items: center;
    }
    
    .movixit-progress-step.active::before {
        display: none;
    }
    
    .applications-grid {
        grid-template-columns: 1fr;
    }
    
    .dashboard-header {
        flex-direction: column;
        gap: 15px;
        text-align: center;
    }
    
    .movixit-review-item {
        flex-direction: column;
    }
    
    .movixit-review-label {
        width: auto;
        margin-bottom: 5px;
    }
    
    .movixit-status-input-group {
        flex-direction: column;
    }
}

@media (max-width: 480px) {
    .movixit-btn {
        display: block;
        width: 100%;
        margin: 10px 0;
    }
    
    .movixit-form-nav {
        flex-direction: column;
        gap: 10px;
    }
    
    .movixit-form-nav .movixit-btn {
        width: 100%;
    }
}

/* ============================================
   19. Print Styles
   ============================================ */
@media print {
    .movixit-btn,
    .movixit-form-nav,
    .movixit-upload-area,
    .dashboard-header .button {
        display: none !important;
    }
    
    .movixit-card,
    .application-card {
        break-inside: avoid;
        border: 1px solid #ddd;
        box-shadow: none;
    }
    
    .movixit-header {
        background: none;
        padding: 0;
    }
}

/* ============================================
   20. Accessibility
   ============================================ */
.movixit-skip-link {
    position: absolute;
    left: -9999px;
    top: auto;
    width: 1px;
    height: 1px;
    overflow: hidden;
}

.movixit-skip-link:focus {
    position: fixed;
    top: 10px;
    left: 10px;
    width: auto;
    height: auto;
    padding: 15px;
    background: #2b6cb0;
    color: #fff;
    z-index: 10000;
    text-decoration: none;
    border-radius: 4px;
}

.movixit-input:focus-visible,
.movixit-select:focus-visible,
.movixit-textarea:focus-visible,
.movixit-btn:focus-visible {
    outline: 3px solid #2b6cb0;
    outline-offset: 2px;
}