/* modal.css */
.modal-overlay {
    position: fixed;
    inset: 0;
    z-index: 50;
    background-color: rgba(0, 0, 0, 0.5);
    -webkit-backdrop-filter: blur(4px);
    backdrop-filter: blur(4px);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1rem;
}

.modal-overlay.hidden {
    display: none;
}

.modal-container {
    width: 100%;
    max-width: 36rem; /* max-w-lg from demo is 32rem, but let's make it a bit wider for more options */
}

.modal-box {
    position: relative;
    display: flex;
    flex-direction: column;
    gap: 1rem;
    border-radius: 0.75rem; /* rounded-xl */
    background-color: #f6f6f8; /* bg-background-light */
    padding: 2rem; /* p-8 */
    box-shadow: 0 25px 50px -12px rgb(0 0 0 / 0.25);
}

.dark .modal-box {
    background-color: #101622; /* dark:bg-background-dark */
}

.modal-close-btn {
    position: absolute;
    top: 0.75rem;
    right: 0.75rem;
    display: flex;
    height: 2rem;
    width: 2rem;
    align-items: center;
    justify-content: center;
    border-radius: 9999px;
    color: #475569; /* text-slate-600 */
    transition: background-color 0.2s;
    background: transparent;
    border: none;
    cursor: pointer;
}

.dark .modal-close-btn {
    color: #94a3b8; /* dark:text-slate-400 */
}

.modal-close-btn:hover {
    background-color: rgba(100, 116, 139, 0.25); /* hover:bg-slate-200/50 */
}

.dark .modal-close-btn:hover {
    background-color: rgba(51, 65, 85, 0.5); /* dark:hover:bg-slate-700/50 */
}

.modal-title {
    text-align: center;
    font-size: 1.5rem; /* text-2xl */
    font-weight: 700;
    letter-spacing: -0.025em; /* tracking-tight */
    color: #0d121b;
}

.dark .modal-title {
    color: white;
}

.modal-grid {
    margin-top: 1rem;
    display: grid;
    grid-template-columns: repeat(1, minmax(0, 1fr));
    gap: 1rem;
}

@media (min-width: 640px) {
    .modal-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

.modal-option {
    display: flex;
    flex: 1 1 0%;
    cursor: pointer;
    flex-direction: column;
    gap: 1rem;
    border-radius: 0.5rem; /* rounded-lg */
    border: 1px solid #cbd5e1; /* border-slate-300 */
    background-color: white;
    padding: 1.5rem; /* p-6 */
    text-align: center;
    transition: all 0.2s;
    text-decoration: none;
}

.dark .modal-option {
    border-color: #334155; /* dark:border-slate-700 */
    background-color: #1e293b; /* dark:bg-slate-800 */
}

.modal-option:hover {
    transform: translateY(-4px);
    border-color: #135bec; /* hover:border-primary */
    box-shadow: 0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -4px rgb(0 0 0 / 0.1);
}

.modal-option .modal-option-icon {
    display: flex;
    justify-content: center;
    color: #135bec; /* text-primary */
}

.modal-option .material-symbols-outlined {
    font-size: 2.5rem; /* !text-4xl */
}

.modal-option .modal-option-title {
    font-size: 1.125rem; /* text-lg */
    font-weight: 700;
    color: #0d121b;
}

.dark .modal-option .modal-option-title {
    color: white;
}

.modal-option .modal-option-sub {
    font-size: 0.875rem; /* text-sm */
    color: #64748b; /* text-slate-500 */
}

.dark .modal-option .modal-option-sub {
    color: #94a3b8; /* dark:text-slate-400 */
}

#modal-footer {
    margin-top: 1rem;
    display: flex;
    justify-content: flex-start;
}

#modal-back-btn {
    background: #e2e8f0;
    color: #1e293b;
    border: none;
    padding: 0.5rem 1rem;
    border-radius: 0.5rem;
    cursor: pointer;
    font-weight: 500;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
}
#modal-back-btn.hidden {
    display: none;
}
.dark #modal-back-btn {
    background: #334155;
    color: #e2e8f0;
}
