/* HiraUSA Custom Booking Plugin - Frontend Styles */

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700&display=swap');

.hirausa-booking-wrapper {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    max-width: 960px;
    margin: 30px auto;
    padding: 25px;
    background: #ffffff;
    border-radius: 20px;
    box-shadow: 0 20px 40px -15px rgba(15, 23, 42, 0.08), 0 0 1px 1px rgba(15, 23, 42, 0.05);
    color: #1e293b;
    box-sizing: border-box;
}

.hirausa-booking-wrapper *, .hirausa-booking-wrapper *:before, .hirausa-booking-wrapper *:after {
    box-sizing: inherit;
}

/* Header */
.hirausa-booking-header {
    text-align: center;
    margin-bottom: 30px;
}

.hirausa-booking-header h2 {
    font-size: 28px;
    font-weight: 700;
    color: #0f172a;
    margin: 0 0 8px 0;
    letter-spacing: -0.5px;
}

.hirausa-booking-header p {
    font-size: 15px;
    color: #64748b;
    margin: 0;
}

/* Steps Indicator */
.hirausa-steps {
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 35px;
    padding: 0 10px;
}

.hirausa-step {
    display: flex;
    align-items: center;
    gap: 8px;
    opacity: 0.5;
    transition: all 0.3s ease;
}

.hirausa-step.active {
    opacity: 1;
}

.hirausa-step .step-num {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: #e2e8f0;
    color: #475569;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 14px;
    transition: all 0.3s ease;
}

.hirausa-step.active .step-num {
    background: #2563eb;
    color: #ffffff;
    box-shadow: 0 0 0 4px rgba(37, 99, 235, 0.2);
}

.hirausa-step .step-text {
    font-size: 14px;
    font-weight: 600;
    color: #1e293b;
}

.hirausa-step-line {
    flex: 1;
    max-width: 60px;
    height: 2px;
    background: #e2e8f0;
    margin: 0 15px;
}

/* Alert box */
.hirausa-alert {
    padding: 14px 18px;
    border-radius: 10px;
    margin-bottom: 25px;
    font-size: 14px;
    font-weight: 500;
    animation: fadeIn 0.3s ease;
}

.hirausa-alert-error {
    background: #fef2f2;
    border: 1px solid #fecaca;
    color: #dc2626;
}

.hirausa-alert-success {
    background: #f0fdf4;
    border: 1px solid #bbf7d0;
    color: #16a34a;
}

/* Card Container */
.hirausa-card {
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 16px;
    padding: 24px;
}

/* Step 1 Layout Grid */
.hirausa-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 25px;
}

@media (max-width: 768px) {
    .hirausa-grid {
        grid-template-columns: 1fr;
    }
    .hirausa-step .step-text {
        display: none;
    }
}

/* Calendar Styles */
.hirausa-calendar-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 20px;
}

.hirausa-month-title {
    font-weight: 700;
    font-size: 16px;
    color: #0f172a;
}

.hirausa-cal-nav {
    background: #ffffff;
    border: 1px solid #cbd5e1;
    border-radius: 8px;
    width: 34px;
    height: 34px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-size: 20px;
    color: #475569;
    transition: all 0.2s ease;
}

.hirausa-cal-nav:hover {
    background: #2563eb;
    color: #ffffff;
    border-color: #2563eb;
}

.hirausa-weekdays {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    text-align: center;
    font-size: 12px;
    font-weight: 600;
    color: #94a3b8;
    margin-bottom: 10px;
    text-transform: uppercase;
}

.hirausa-days-grid {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 6px;
}

.hirausa-day-cell {
    aspect-ratio: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    font-size: 13px;
    font-weight: 600;
    border-radius: 10px;
    cursor: pointer;
    background: #ffffff;
    border: 1px solid #e2e8f0;
    color: #334155;
    transition: all 0.2s ease;
    user-select: none;
    position: relative;
    padding: 2px;
}

.hirausa-day-cell.empty {
    background: transparent;
    border: none;
    cursor: default;
}

.hirausa-day-cell.disabled {
    opacity: 0.5;
    background: #f1f5f9;
    border-color: #e2e8f0;
    cursor: not-allowed;
}

.hirausa-day-cell.blackout {
    background: #fef2f2 !important;
    border-color: #fecaca !important;
    color: #dc2626 !important;
    opacity: 0.95 !important;
    cursor: not-allowed;
}

.hirausa-day-cell.fully-booked {
    background: #f8fafc !important;
    border-color: #cbd5e1 !important;
    color: #64748b !important;
    opacity: 0.85 !important;
    cursor: not-allowed;
}

.cell-status-tag {
    font-size: 8px;
    font-weight: 700;
    line-height: 1;
    padding: 2px 4px;
    border-radius: 3px;
    margin-top: 2px;
    max-width: 90%;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    text-transform: uppercase;
}

.cell-status-tag.blackout-tag {
    background: #fee2e2;
    color: #dc2626;
}

.cell-status-tag.booked-tag {
    background: #e2e8f0;
    color: #475569;
}

.hirausa-day-cell.available:hover {
    border-color: #2563eb;
    color: #2563eb;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(37, 99, 235, 0.15);
}

.hirausa-day-cell.selected {
    background: #2563eb !important;
    color: #ffffff !important;
    border-color: #2563eb !important;
    box-shadow: 0 4px 14px rgba(37, 99, 235, 0.3);
}

.hirausa-day-cell.selected .cell-status-tag {
    background: rgba(255, 255, 255, 0.2);
    color: #ffffff;
}

/* Slots Section */
.hirausa-card-title {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 18px;
}

.hirausa-card-title h3 {
    font-size: 16px;
    font-weight: 700;
    margin: 0;
}

.hirausa-selected-date-badge {
    font-size: 12px;
    font-weight: 600;
    padding: 4px 10px;
    border-radius: 20px;
    background: #dbeafe;
    color: #1e40af;
}

.hirausa-slots-loading {
    text-align: center;
    padding: 40px 0;
    color: #64748b;
    font-size: 14px;
}

.hirausa-spinner {
    width: 28px;
    height: 28px;
    border: 3px solid #e2e8f0;
    border-top-color: #2563eb;
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
    margin: 0 auto 10px auto;
}

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

.hirausa-slots-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
    gap: 10px;
    max-height: 260px;
    overflow-y: auto;
    padding-right: 4px;
}

.hirausa-slot-pill {
    padding: 10px 12px;
    border-radius: 10px;
    background: #ffffff;
    border: 1.5px solid #cbd5e1;
    font-size: 13px;
    font-weight: 600;
    color: #334155;
    text-align: center;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 4px;
}

.hirausa-slot-pill:hover:not(.booked):not(.blocked):not(.past) {
    border-color: #2563eb;
    color: #2563eb;
    background: #eff6ff;
}

.hirausa-slot-pill.selected {
    background: #2563eb !important;
    color: #ffffff !important;
    border-color: #2563eb !important;
    box-shadow: 0 4px 12px rgba(37, 99, 235, 0.25);
}

/* Booked & Blocked Slots Styling */
.hirausa-slot-pill.booked {
    background: #fef2f2;
    border-color: #fecaca;
    color: #991b1b;
    cursor: not-allowed;
    pointer-events: none;
    opacity: 0.85;
}

.hirausa-slot-pill.blocked {
    background: #fff7ed;
    border-color: #ffedd5;
    color: #9a3412;
    cursor: not-allowed;
    pointer-events: none;
    opacity: 0.85;
}

.hirausa-slot-pill.past {
    background: #f1f5f9;
    border-color: #e2e8f0;
    color: #94a3b8;
    cursor: not-allowed;
    pointer-events: none;
    opacity: 0.6;
}

.slot-badge {
    font-size: 10px;
    font-weight: 700;
    padding: 2px 6px;
    border-radius: 4px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.booked-badge {
    background: #fee2e2;
    color: #dc2626;
}

.blocked-badge {
    background: #ffedd5;
    color: #ea580c;
}

.past-badge {
    background: #e2e8f0;
    color: #64748b;
}

.hirausa-empty-state {
    grid-column: 1 / -1;
    text-align: center;
    padding: 30px 15px;
    color: #64748b;
}

.hirausa-empty-state .empty-icon {
    font-size: 32px;
    margin-bottom: 8px;
}

/* Step 2 Form */
.hirausa-selected-summary {
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    padding: 14px 20px;
    margin-bottom: 25px;
    display: flex;
    gap: 25px;
}

.summary-item .label {
    font-size: 12px;
    color: #64748b;
    display: block;
    margin-bottom: 2px;
}

.summary-item strong {
    font-size: 15px;
    color: #0f172a;
}

.hirausa-form-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 18px;
}

.hirausa-form-group.full-width {
    grid-column: 1 / -1;
}

@media (max-width: 600px) {
    .hirausa-form-grid {
        grid-template-columns: 1fr;
    }
}

.hirausa-form-group label {
    display: block;
    font-size: 13px;
    font-weight: 600;
    color: #334155;
    margin-bottom: 6px;
}

.hirausa-form-group .required {
    color: #ef4444;
}

.hirausa-form-group .optional {
    color: #94a3b8;
    font-weight: 400;
    font-size: 12px;
}

.hirausa-input, .hirausa-textarea {
    width: 100%;
    padding: 12px 14px;
    border-radius: 10px;
    border: 1px solid #cbd5e1;
    background: #ffffff;
    font-size: 14px;
    color: #0f172a;
    transition: all 0.2s ease;
}

.hirausa-input:focus, .hirausa-textarea:focus {
    outline: none;
    border-color: #2563eb;
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.15);
}

/* Action Buttons */
.hirausa-step-actions {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 15px;
}

.hirausa-btn {
    padding: 12px 24px;
    border-radius: 10px;
    font-weight: 600;
    font-size: 14px;
    cursor: pointer;
    border: none;
    transition: all 0.2s ease;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.hirausa-btn-primary {
    background: #2563eb;
    color: #ffffff;
}

.hirausa-btn-primary:hover:not(:disabled) {
    background: #1d4ed8;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(37, 99, 235, 0.3);
}

.hirausa-btn-secondary {
    background: #ffffff;
    border: 1px solid #cbd5e1;
    color: #475569;
}

.hirausa-btn-secondary:hover {
    background: #f1f5f9;
    color: #0f172a;
}

.hirausa-btn-success {
    background: #16a34a;
    color: #ffffff;
}

.hirausa-btn-success:hover {
    background: #15803d;
    box-shadow: 0 4px 12px rgba(22, 163, 74, 0.3);
}

.hirausa-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    transform: none !important;
    box-shadow: none !important;
}

/* Step 3 Confirmation Card */
.hirausa-success-card {
    text-align: center;
    padding: 40px 25px;
    background: #ffffff;
}

.hirausa-success-icon {
    width: 64px;
    height: 64px;
    background: #dcfce7;
    color: #16a34a;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 32px;
    font-weight: 900;
    margin: 0 auto 20px auto;
    box-shadow: 0 0 0 8px rgba(22, 163, 74, 0.1);
}

.hirausa-success-title {
    font-size: 24px;
    font-weight: 700;
    color: #0f172a;
    margin: 0 0 8px 0;
}

.hirausa-success-desc {
    color: #64748b;
    font-size: 15px;
    margin: 0 0 30px 0;
}

.hirausa-confirmation-box {
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    padding: 20px;
    max-width: 450px;
    margin: 0 auto 30px auto;
    text-align: left;
}

.conf-row {
    display: flex;
    justify-content: space-between;
    padding: 8px 0;
    border-bottom: 1px dashed #e2e8f0;
    font-size: 14px;
}

.conf-row:last-child {
    border-bottom: none;
}

.conf-label {
    color: #64748b;
    font-weight: 500;
}

.conf-val {
    font-weight: 700;
    color: #0f172a;
}

/* Meeting Buttons */
.hirausa-meeting-box {
    background: #eff6ff;
    border: 1px solid #bfdbfe;
    border-radius: 14px;
    padding: 24px;
    max-width: 550px;
    margin: 0 auto;
}

.hirausa-meeting-box h4 {
    margin: 0 0 6px 0;
    font-size: 16px;
    color: #1e3a8a;
}

.hirausa-meeting-box p {
    margin: 0 0 16px 0;
    font-size: 13px;
    color: #3b82f6;
}

.hirausa-meeting-buttons {
    display: flex;
    gap: 12px;
    justify-content: center;
    flex-wrap: wrap;
}

.hirausa-meet-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 12px 20px;
    border-radius: 10px;
    font-weight: 600;
    font-size: 14px;
    text-decoration: none !important;
    color: #ffffff !important;
    transition: all 0.2s ease;
}

.hirausa-meet-btn.ms-teams {
    background: #5b5fc7;
}

.hirausa-meet-btn.ms-teams:hover {
    background: #494ca3;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(91, 95, 199, 0.3);
}
