/* Admin Interview Booking Interface Styles */
/* Created: 2025-09-15 */

.admin-booking-container {
    max-width: 800px;
    margin: 0 auto;
    padding: 20px;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
}

.admin-booking-header {
    text-align: center;
    margin-bottom: 30px;
    padding-bottom: 20px;
    border-bottom: 2px solid #5486B1;
}

.admin-booking-header h1 {
    color: #034AA6;
    margin-bottom: 10px;
    font-size: 28px;
    font-weight: 600;
}

.admin-booking-header p {
    color: #5486B1;
    font-size: 16px;
    margin: 0;
}

.admin-booking-form-container {
    background: white;
    border-radius: 10px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    padding: 30px;
    margin-bottom: 20px;
}

.form-section {
    margin-bottom: 30px;
    padding-bottom: 25px;
    border-bottom: 1px solid #e0e0e0;
}

.form-section:last-child {
    border-bottom: none;
    margin-bottom: 0;
}

.form-section h3 {
    color: #034AA6;
    margin-bottom: 20px;
    font-size: 18px;
    font-weight: 600;
    display: flex;
    align-items: center;
}

.form-section h3::before {
    content: '';
    width: 4px;
    height: 18px;
    background: #5486B1;
    margin-right: 10px;
    border-radius: 2px;
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
    margin-bottom: 20px;
    align-items: center; /* Center items vertically */
}

.form-group {
    display: flex;
    flex-direction: column;
}

.form-group button {
    margin-top: 28px; /* Match the label's margin and font size to align with input */
}

.form-group label {
    font-weight: 600;
    color: #0D0D0D;
    margin-bottom: 8px;
    font-size: 14px;
}

.form-group input,
.form-group select {
    padding: 12px 15px;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    font-size: 14px;
    transition: border-color 0.3s ease, box-shadow 0.3s ease;
    background: white;
}

.form-group input:focus,
.form-group select:focus {
    outline: none;
    border-color: #5486B1;
    box-shadow: 0 0 0 3px rgba(84, 134, 177, 0.1);
}

.form-group small {
    color: #666;
    font-size: 12px;
    margin-top: 5px;
}

.recruiter-info,
.aupair-details {
    background: #f8f9fa;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    padding: 15px;
    margin-top: 15px;
}

.info-item,
.detail-item {
    margin-bottom: 8px;
}

.info-item:last-child,
.detail-item:last-child {
    margin-bottom: 0;
}

.details-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 15px;
}

.conflict-check {
    background: #fff3cd;
    border: 1px solid #ffeaa7;
    border-radius: 8px;
    padding: 20px;
}

.conflict-warning {
    display: flex;
    align-items: flex-start;
    gap: 15px;
}

.warning-icon {
    font-size: 24px;
    line-height: 1;
}

.warning-content strong {
    color: #856404;
    display: block;
    margin-bottom: 8px;
}

.conflict-warning ul {
    margin: 10px 0 0 0;
    padding-left: 20px;
}

.conflict-warning li {
    color: #856404;
    margin-bottom: 5px;
}

.form-actions {
    display: flex;
    gap: 15px;
    justify-content: flex-end;
    margin-top: 30px;
    padding-top: 20px;
    border-top: 1px solid #e0e0e0;
}

.btn-primary {
    background: #5486B1;
    color: white;
    padding: 12px 25px;
    border: none;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    min-width: 150px;
}

.btn-primary:hover:not(:disabled) {
    background: #034AA6;
    transform: translateY(-1px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
}

.btn-primary:disabled {
    background: #ccc;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

.btn-secondary {
    background: white;
    color: #5486B1;
    padding: 12px 20px;
    border: 2px solid #5486B1;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

.btn-secondary:hover:not(:disabled) {
    background: #5486B1;
    color: white;
    transform: translateY(-1px);
}

.btn-secondary:disabled {
    background: #f8f9fa;
    color: #ccc;
    border-color: #ccc;
    cursor: not-allowed;
    transform: none;
}

.booking-status {
    margin-top: 20px;
}

.status-success {
    background: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
    border-radius: 8px;
    padding: 15px;
    font-weight: 500;
}

.status-error {
    background: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
    border-radius: 8px;
    padding: 15px;
    font-weight: 500;
}

.admin-error {
    background: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
    border-radius: 8px;
    padding: 20px;
    text-align: center;
    font-weight: 500;
}

/* Responsive Design */
@media (max-width: 768px) {
    .admin-booking-container {
        padding: 15px;
    }
    
    .admin-booking-form-container {
        padding: 20px;
    }
    
    .form-row {
        grid-template-columns: 1fr;
        gap: 15px;
    }
    
    .details-grid {
        grid-template-columns: 1fr;
        gap: 10px;
    }
    
    .form-actions {
        flex-direction: column;
    }
    
    .btn-primary,
    .btn-secondary {
        width: 100%;
        justify-self: stretch;
    }
    
    .admin-booking-header h1 {
        font-size: 24px;
    }
}

/* Loading States */
.btn-primary:disabled:after,
.btn-secondary:disabled:after {
    content: '';
    width: 16px;
    height: 16px;
    border: 2px solid transparent;
    border-top: 2px solid currentColor;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    display: inline-block;
    margin-left: 8px;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

/* Form Validation */
.form-group input:invalid,
.form-group select:invalid {
    border-color: #F25252;
}

.form-group input:valid,
.form-group select:valid {
    border-color: #28a745;
}

/* Custom Select Styling */
.form-group select {
    appearance: none;
    background-image: url("data:image/svg+xml;charset=UTF-8,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='currentColor' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3e%3cpolyline points='6,9 12,15 18,9'%3e%3c/polyline%3e%3c/svg%3e");
    background-repeat: no-repeat;
    background-position: right 12px center;
    background-size: 16px;
    padding-right: 40px;
}

/* Accessibility */
.form-group input:focus,
.form-group select:focus,
.btn-primary:focus,
.btn-secondary:focus {
    outline: 2px solid #5486B1;
    outline-offset: 2px;
}

/* Brand Colors Integration */
.form-section h3::before {
    background: linear-gradient(135deg, #5486B1, #034AA6);
}

.btn-primary {
    background: linear-gradient(135deg, #5486B1, #034AA6);
}

.btn-primary:hover:not(:disabled) {
    background: linear-gradient(135deg, #034AA6, #035AAA);
}

.tab-content {
    margin-top: 20px;
}

.nav-tab-wrapper {
    margin-bottom: 0;
}

.form-table th {
    width: 150px;
}

.form-table input[type="text"],
.form-table input[type="password"] {
    width: 100%;
    max-width: 400px;
}

/* Calendar Styles - Higher Specificity */
.elementor-shortcode .aupair-calendar { 
    font-family: Arial, sans-serif !important; 
    margin: 20px 0 !important; 
    position: relative !important;
}
.elementor-shortcode .cal-month { 
    margin-bottom: 30px !important; 
    border: 1px solid #ddd !important; 
    border-radius: 8px !important; 
    overflow: hidden !important; 
}
.elementor-shortcode .cal-header { 
    background: #5486B1 !important; 
    color: white !important; 
    padding: 15px !important; 
    text-align: center !important; 
    font-weight: bold !important; 
    font-size: 18px !important; 
}
.elementor-shortcode .cal-grid { 
    display: grid !important; 
    grid-template-columns: repeat(7, 1fr) !important; 
    gap: 1px !important; 
    background: #ddd !important; 
}
.elementor-shortcode .cal-day-header { 
    background: #034AA6 !important; 
    color: white !important; 
    padding: 8px 4px !important; 
    text-align: center !important; 
    font-weight: bold !important; 
    font-size: 12px !important; 
}
.elementor-shortcode .cal-day { 
    background: white !important; 
    min-height: 70px !important; 
    padding: 4px !important; 
    position: relative !important; 
}
.cal-day.cal-other { 
    background: #f8f9fa; 
    color: #999; 
}
.elementor-shortcode .cal-day.cal-has-appt { 
    background: #e3f2fd !important; 
}
.cal-day:hover {
    background: #f0f8ff;
}
.cal-day.cal-has-appt:hover {
    background: #bbdefb;
}
.cal-day-num { 
    font-weight: bold; 
    margin-bottom: 4px; 
}
.cal-appt { 
    color: white; 
    padding: 1px 3px; 
    margin: 1px 0; 
    border-radius: 2px; 
    font-size: 9px; 
    overflow: hidden; 
    cursor: help;
    transition: opacity 0.2s;
}
.cal-appt:hover {
    opacity: 0.8;
    transform: scale(1.05);
}
.elementor-shortcode .cal-appt.cal-english { background: #5486B1 !important; }
.elementor-shortcode .cal-appt.cal-german { background: #F25252 !important; }
.elementor-shortcode .cal-appt.cal-spanish { background: #034AA6 !important; }
.cal-count { 
    position: absolute; 
    top: 2px; 
    right: 4px; 
    background: #dc3545; 
    color: white; 
    border-radius: 50%; 
    width: 16px; 
    height: 16px; 
    font-size: 9px; 
    display: flex; 
    align-items: center; 
    justify-content: center; 
}
.cal-legend { 
    margin-top: 15px; 
    padding: 10px; 
    background: #f8f9fa; 
    border-radius: 5px; 
    font-size: 14px; 
}
.cal-legend-item { 
    display: inline-block; 
    margin-right: 15px; 
}
.cal-legend-color { 
    display: inline-block; 
    width: 12px; 
    height: 12px; 
    margin-right: 5px; 
    border-radius: 2px; 
}

/* Responsive design */
@media (max-width: 768px) {
    .cal-grid { grid-template-columns: repeat(7, 1fr); }
    .cal-day { min-height: 50px; padding: 2px; }
    .cal-appt { font-size: 8px; padding: 0 2px; }
    .cal-day-num { font-size: 12px; }
}

/* Debug mode styles */
.aupair-calendar[data-debug="1"] .cal-day {
    border: 1px dashed #ccc;
}
.aupair-calendar[data-debug="1"] .cal-day.cal-has-appt {
    border-color: #5486B1;
}