:root {
    --ag-primary: #6366f1;
    /* Indigo 500 */
    --ag-primary-hover: #4f46e5;
    --ag-bg-glass: rgba(255, 255, 255, 0.95);
    --ag-text-main: #1e293b;
    --ag-text-muted: #64748b;
    --ag-border: #e2e8f0;
    --ag-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.1), 0 8px 10px -6px rgba(0, 0, 0, 0.1);
    --ag-radius: 12px;
}

.ag-scheduler-wrapper {
    font-family: 'Inter', system-ui, -apple-system, sans-serif;
    max-width: 800px;
    margin: 40px auto;
    display: flex;
    gap: 20px;
    justify-content: center;
    position: relative;
    color: var(--ag-text-main);
}

/* Cards */
.ag-calendar-card,
.ag-time-slots-card {
    background: var(--ag-bg-glass);
    backdrop-filter: blur(10px);
    border: 1px solid var(--ag-border);
    border-radius: var(--ag-radius);
    padding: 24px;
    box-shadow: var(--ag-shadow);
    flex: 1;
    min-width: 300px;
    transition: all 0.3s ease;
}

.hidden {
    display: none !important;
}

/* Calendar Header */
.ag-calendar-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

.ag-calendar-header h2 {
    font-size: 1.1rem;
    font-weight: 600;
    margin: 0;
    color: var(--ag-text-main);
}

.ag-nav-btn {
    background: transparent;
    border: 1px solid var(--ag-border);
    border-radius: 6px;
    width: 32px;
    height: 32px;
    cursor: pointer;
    font-weight: bold;
    color: var(--ag-text-muted);
    transition: all 0.2s;
}

.ag-nav-btn:hover {
    border-color: var(--ag-primary);
    color: var(--ag-primary);
    background: #e0e7ff;
}

/* Grid */
.ag-calendar-grid-header,
.ag-calendar-grid {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 8px;
    text-align: center;
}

.ag-calendar-grid-header {
    margin-bottom: 12px;
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--ag-text-muted);
    text-transform: uppercase;
}

.ag-day {
    padding: 10px 0;
    border-radius: 8px;
    cursor: pointer;
    font-size: 0.95rem;
    transition: all 0.2s;
    border: 1px solid transparent;
}

.ag-day:hover:not(.empty) {
    background: #f1f5f9;
    color: var(--ag-primary);
    font-weight: 600;
}

.ag-day.empty {
    cursor: default;
}

.ag-day.today {
    border-color: var(--ag-primary);
    color: var(--ag-primary);
    font-weight: 700;
}

.ag-day.selected {
    background: var(--ag-primary);
    color: white;
    box-shadow: 0 4px 6px -1px rgba(79, 70, 229, 0.4);
}

/* Time Slots */
.ag-slots-header {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 10px;
}

.ag-back-btn {
    background: none;
    border: none;
    color: var(--ag-text-muted);
    cursor: pointer;
    font-size: 0.9rem;
    padding: 0;
}

.ag-back-btn:hover {
    color: var(--ag-text-main);
    text-decoration: underline;
}

.ag-selected-date-label {
    font-size: 0.9rem;
    margin-bottom: 16px;
    color: var(--ag-text-muted);
}

.ag-slots-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 10px;
}

.ag-time-slot {
    padding: 12px;
    border: 1px solid var(--ag-border);
    border-radius: 8px;
    background: white;
    cursor: pointer;
    font-weight: 500;
    color: var(--ag-primary);
    transition: all 0.2s;
}

.ag-time-slot:hover {
    border-color: var(--ag-primary);
    background: #e0e7ff;
    transform: translateY(-2px);
}

/* Modal */
.ag-modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.4);
    backdrop-filter: blur(4px);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 9999;
    animation: fadeIn 0.2s ease;
}

.ag-modal-content {
    background: white;
    padding: 30px;
    border-radius: 16px;
    width: 90%;
    max-width: 400px;
    position: relative;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
    animation: slideUp 0.3s ease;
}

.ag-modal-close {
    position: absolute;
    top: 15px;
    right: 15px;
    background: none;
    border: none;
    font-size: 1.5rem;
    cursor: pointer;
    color: var(--ag-text-muted);
}

.ag-form-group {
    margin-bottom: 16px;
}

.ag-form-group label {
    display: block;
    margin-bottom: 6px;
    font-size: 0.9rem;
    font-weight: 500;
    color: var(--ag-text-main);
}

.ag-form-group input {
    width: 100%;
    padding: 10px;
    border: 1px solid var(--ag-border);
    border-radius: 6px;
    font-size: 1rem;
    transition: border 0.2s;
    box-sizing: border-box;
    /* WP Reset fix */
}

.ag-form-group input:focus {
    outline: none;
    border-color: var(--ag-primary);
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.2);
}

.ag-submit-btn {
    width: 100%;
    padding: 12px;
    background: var(--ag-primary);
    color: white;
    border: none;
    border-radius: 8px;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.2s;
}

.ag-submit-btn:hover {
    background: var(--ag-primary-hover);
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}

@keyframes slideUp {
    from {
        transform: translateY(20px);
        opacity: 0;
    }

    to {
        transform: translateY(0);
        opacity: 1;
    }
}

/* Notification */
.ag-notification {
    position: fixed;
    bottom: 20px;
    right: 20px;
    background: #10b981;
    color: white;
    padding: 12px 24px;
    border-radius: 8px;
    font-weight: 600;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    z-index: 10000;
    animation: slideUp 0.3s ease;
}