/* BrainyPing — minimal custom styles. Tailwind CDN handles utility classes. */

/* Toast fade-in animation */
@keyframes fade-in {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}
@keyframes fade-out {
    from { opacity: 1; transform: translateY(0); }
    to { opacity: 0; transform: translateY(10px); }
}
.animate-fade-in {
    animation: fade-in 0.2s ease-out;
}
.animate-fade-out {
    animation: fade-out 0.3s ease-in forwards;
}

/* --- Toggle switch --- */
.toggle-switch {
    position: relative;
    width: 2.5rem;
    height: 1.375rem;
    border-radius: 9999px;
    cursor: pointer;
    transition: background-color 0.2s;
    flex-shrink: 0;
}
.toggle-switch::after {
    content: '';
    position: absolute;
    top: 0.125rem;
    left: 0.125rem;
    width: 1.125rem;
    height: 1.125rem;
    border-radius: 9999px;
    background: white;
    transition: transform 0.2s;
    box-shadow: 0 1px 2px rgba(0,0,0,0.1);
}
.toggle-switch.active {
    background-color: #16a34a;
}
.toggle-switch.active::after {
    transform: translateX(1.125rem);
}
.toggle-switch.inactive {
    background-color: #d1d5db;
}

/* --- Pills (single-select and multi-select) --- */
.pill-group {
    display: flex;
    flex-wrap: wrap;
    gap: 0.375rem;
}
.pill {
    padding: 0.375rem 0.75rem;
    border-radius: 9999px;
    border: 1px solid #d1d5db;
    font-size: 0.8125rem;
    cursor: pointer;
    transition: all 0.15s;
    background: white;
    color: #374151;
    user-select: none;
    line-height: 1.25;
}
.pill:hover {
    border-color: #9ca3af;
    background: #f9fafb;
}
.pill.active {
    background: #2563eb;
    color: white;
    border-color: #2563eb;
}
.pill.active:hover {
    background: #1d4ed8;
    border-color: #1d4ed8;
}

/* --- Form tabs --- */
.form-tabs {
    display: flex;
    gap: 0.5rem;
    margin-bottom: 1.25rem;
}
.form-tab {
    flex: 1;
    padding: 0.625rem 0.75rem;
    border-radius: 0.5rem;
    border: 1px solid #e5e7eb;
    background: white;
    cursor: pointer;
    transition: all 0.15s;
    text-align: left;
}
.form-tab:hover {
    border-color: #d1d5db;
    background: #f9fafb;
}
.form-tab.active {
    border-color: #3b82f6;
    background: #eff6ff;
}
.form-tab-label {
    display: block;
    font-size: 0.8125rem;
    font-weight: 600;
    color: #111827;
}
.form-tab.active .form-tab-label {
    color: #2563eb;
}
.form-tab-desc {
    display: block;
    font-size: 0.6875rem;
    color: #9ca3af;
    margin-top: 0.125rem;
}
.form-panel {
    display: none;
}
.form-panel.active {
    display: block;
}

/* --- Modal system --- */
.modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.5);
    display: flex;
    align-items: flex-start;
    justify-content: center;
    padding-top: 10vh;
    overflow-y: auto;
    padding-bottom: 2rem;
}
.modal-overlay.hidden {
    display: none;
}
.modal-container {
    background: white;
    border-radius: 0.75rem;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
    width: 100%;
    margin-left: 1rem;
    margin-right: 1rem;
    animation: fade-in 0.15s ease-out;
    display: flex;
    flex-direction: column;
    max-height: 80vh;
}
.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 1.5rem;
    border-bottom: 1px solid #e5e7eb;
    flex-shrink: 0;
}
.modal-body {
    padding: 1.5rem;
    overflow-y: auto;
    flex: 1;
    min-height: 0;
}
