/* app.css — Custom styles for Meeting Poll (extracted from inline <style>) */

/* -- Selection grid cells -- */
.table-cell-selectable {
    -webkit-user-select: none;
    -ms-user-select: none;
    user-select: none;
    position: relative;
}
.user-selection {
    outline: 3px solid #262a36;
    outline-offset: -3px;
    background-color: #0cd9d6 !important;
}
.dark .user-selection {
     outline: 3px solid #0cd9d6;
}
.user-suggestion::after {
    content: '⭐';
    position: absolute;
    top: 2px;
    right: 2px;
    font-size: 0.75rem;
}

/* -- Calendar -- */
.calendar { font-family: 'Poppins', sans-serif; }
.calendar-day { 
    transition: all 0.2s ease;
    width: 2.5rem;
    height: 2.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
}
.calendar-day.selected { background-color: #0cd9d6; color: white; border-radius: 50%; }
.dark .calendar-day.selected { color: #262a36; }
.calendar-day.today { font-weight: 800; border: 2px solid #262a36; border-radius: 50%; }
.dark .calendar-day.today { border-color: #0cd9d6; }

/* -- Creator grid blocks -- */
.creator-cell.available { 
    background-color: #0cd9d6;
    color: #262a36;
    font-weight: 600;
    font-size: 0.75rem;
    text-align: center;
    vertical-align: middle;
    position: relative;
    padding: 0;
    border-top: none;
    border-bottom: none;
}
.dark .creator-cell.available {
     color: #262a36;
}
.creator-cell.block-start {
     border-top-left-radius: 0.375rem;
     border-top-right-radius: 0.375rem;
     vertical-align: top;
     padding-top: 0.125rem;
}
.creator-cell.block-end {
     border-bottom-left-radius: 0.375rem;
     border-bottom-right-radius: 0.375rem;
     vertical-align: bottom;
     padding-bottom: 0.125rem;
}
.creator-cell.block-start:not(.block-end) {
    border-bottom: 1px solid rgba(38, 42, 54, 0.4);
}
.dark .creator-cell.block-start:not(.block-end) {
     border-bottom: 1px solid rgba(38, 42, 54, 0.6);
}
.creator-cell.block-start.block-end {
    vertical-align: middle;
    padding: 0.25rem 0;
    border-bottom: none;
}

/* -- Sticky grid headers -- */
#creator-grid-container table {
    border-collapse: separate;
    border-spacing: 0;
}
#creator-grid-container thead th {
    position: sticky;
    top: 0;
    z-index: 20;
}
#creator-grid-container tbody td:first-child {
    position: sticky;
    left: 0;
    z-index: 10;
}
#creator-grid-container thead th:first-child {
    position: sticky;
    top: 0;
    left: 0;
    z-index: 30;
}

/* -- Animated gradient background -- */
.bg-gradient-animated {
    background: linear-gradient(-45deg, #0cd9d6, #0cb7d6, #262a36, #0cd9d6);
    background-size: 400% 400%;
}

/* -- Notification Toast -- */
#notification-toast {
    transform: translate(-50%, -150%);
    opacity: 0;
    transition: transform 0.5s ease-in-out, opacity 0.5s ease-in-out, background-color 0.3s ease;
}
#notification-toast.show {
    transform: translate(-50%, 0);
    opacity: 1;
}
#notification-toast.success {
    background-color: #10B981;
}
#notification-toast.error {
    background-color: #EF4444;
}

/* -- Custom Scrollbar -- */
.custom-scrollbar::-webkit-scrollbar {
    width: 6px;
}
.custom-scrollbar::-webkit-scrollbar-track {
    background: transparent;
}
.custom-scrollbar::-webkit-scrollbar-thumb {
    background-color: #d1d5db;
    border-radius: 20px;
}
.dark .custom-scrollbar::-webkit-scrollbar-thumb {
    background-color: #4b5563;
}
.custom-scrollbar {
    scrollbar-width: thin;
    scrollbar-color: #d1d5db transparent;
}
.dark .custom-scrollbar {
    scrollbar-color: #4b5563 transparent;
}

/* -- Number input arrows (hide) -- */
input[type=number]::-webkit-inner-spin-button,
input[type=number]::-webkit-outer-spin-button {
    -webkit-appearance: none;
    margin: 0;
}
input[type=number] {
    -moz-appearance: textfield;
}

/* -- Custom Radio Buttons -- */
.custom-radio-label {
    display: flex;
    align-items: center;
    cursor: pointer;
    padding: 0.5rem 1rem;
    border: 2px solid #d1d5db;
    border-radius: 0.5rem;
    transition: all 0.2s ease-in-out;
}
.dark .custom-radio-label {
    border-color: #4b5563;
}
.custom-radio-input {
    display: none;
}
.custom-radio-input:checked + .custom-radio-label {
    border-color: #0cd9d6;
    background-color: rgba(12, 217, 214, 0.1);
}
.custom-radio-label:hover {
    border-color: #9ca3af;
}
.dark .custom-radio-label:hover {
    border-color: #6b7280;
}

/* -- Custom checkbox ("None of these") -- */
.custom-checkbox-label {
    display: flex;
    align-items: center;
    cursor: pointer;
    gap: 0.75rem;
}
.custom-checkbox-input {
    display: none;
}
.custom-checkbox-box {
    width: 1.25rem;
    height: 1.25rem;
    border: 2px solid #d1d5db;
    border-radius: 0.375rem;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease-in-out;
    flex-shrink: 0;
}
.dark .custom-checkbox-box {
    border-color: #6b7280;
}
.custom-checkbox-input:checked + .custom-checkbox-label .custom-checkbox-box {
    background-color: #0cd9d6;
    border-color: #0cd9d6;
}
.custom-checkbox-box svg {
    color: white;
    transform: scale(0);
    transition: transform 0.2s ease-in-out;
}
.custom-checkbox-input:checked + .custom-checkbox-label .custom-checkbox-box svg {
    transform: scale(1);
}

/* -- Bold placeholder -- */
#voter-name::placeholder {
    font-weight: 600;
    color: #6b7280;
}
.dark #voter-name::placeholder {
    color: #d1d5db;
}

/* -- Autofill override -- */
input:-webkit-autofill,
input:-webkit-autofill:hover,
input:-webkit-autofill:focus,
input:-webkit-autofill:active {
    -webkit-box-shadow: 0 0 0 30px #f9fafb inset !important;
    -webkit-text-fill-color: #1f2937 !important;
    transition: background-color 5000s ease-in-out 0s;
}
.dark input:-webkit-autofill,
.dark input:-webkit-autofill:hover,
.dark input:-webkit-autofill:focus,
.dark input:-webkit-autofill:active {
    -webkit-box-shadow: 0 0 0 30px #374151 inset !important;
    -webkit-text-fill-color: #f9fafb !important;
}

/* -- Prevent FOUC before Tailwind loads -- */
.hidden { display: none; }
@media (min-width: 768px) {
    .md\:flex { display: flex; }
    .md\:hidden { display: none; }
}
@media (min-width: 1280px) {
    .xl\:flex { display: flex; }
    .xl\:hidden { display: none; }
}

/* -- Pro Lock Overlay -- */
#pro-lock-overlay {
    background-color: rgba(255, 255, 255, 0.88);
    backdrop-filter: blur(2px);
}
.dark #pro-lock-overlay {
    background-color: rgba(31, 41, 55, 0.88);
}

/* -- Checkbox styling (voter) -- */
input[type="checkbox"].custom-checkbox-input:checked + .voter-checkbox-box {
    background-color: #0cd9d6 !important;
    border-color: #0cd9d6 !important;
}
input[type="checkbox"].custom-checkbox-input:checked + .voter-checkbox-box svg {
    display: block !important;
}

/* -- Clerk UserButton popup -- */
.cl-userButtonPopoverCard {
    position: fixed !important;
}

/* -- Dark mode datetime-local -- */
.dark input[type="datetime-local"] {
    color-scheme: dark;
}

/* -- Loading poll (prevent flash) -- */
.loading-poll #creator-view,
.loading-poll #homepage-content,
.loading-poll #pro-pricing-block,
.loading-poll #app-subtitle { display: none !important; }
.loading-poll #poll-loading-spinner { display: flex !important; }
#poll-loading-spinner { display: none; }

/* -- Deadline banner -- */
#deadline-banner { transition: background-color 0.3s; }

/* -- Redirect overlay -- */
#redirect-overlay {
    position: fixed; inset: 0; z-index: 9999;
    display: none; align-items: center; justify-content: center;
    background: rgba(0,0,0,0.7); backdrop-filter: blur(8px);
}
#redirect-overlay.active { display: flex; }
@keyframes spin { to { transform: rotate(360deg); } }
.redirect-spinner { width:40px;height:40px;border:4px solid rgba(255,255,255,0.3);border-top-color:#0cd9d6;border-radius:50%;animation:spin 0.8s linear infinite; }

/* -- Meeting Confirmed Banner -- */
@keyframes confetti-pop {
    0% { transform: scale(0.8); opacity: 0; }
    50% { transform: scale(1.05); }
    100% { transform: scale(1); opacity: 1; }
}
.confirmed-banner {
    animation: confetti-pop 0.5s ease-out forwards;
}

/* -- Analytics badges -- */
.analytics-badge {
    display: inline-flex; align-items: center; gap: 0.375rem;
    padding: 0.25rem 0.625rem; border-radius: 9999px;
    font-size: 0.75rem; font-weight: 600;
    white-space: nowrap;
}

/* -- Floating refresh FAB -- */
.refresh-fab {
    position: fixed;
    bottom: 1.5rem;
    right: 1.5rem;
    z-index: 30;
    width: 48px;
    height: 48px;
    border-radius: 50%;
    display: none;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 14px rgba(0,0,0,0.15);
    transition: all 0.2s ease;
    border: none;
    cursor: pointer;
}
.refresh-fab.visible {
    display: flex;
}
.refresh-fab:hover {
    transform: scale(1.1);
    box-shadow: 0 6px 20px rgba(0,0,0,0.2);
}
.refresh-fab:active {
    transform: scale(0.95);
}
.refresh-fab .material-symbols-outlined {
    font-size: 24px;
}
.refresh-fab.spinning .material-symbols-outlined {
    animation: spin 0.8s linear infinite;
}
.refresh-fab.success {
    background-color: #10b981 !important;
}

/* ===== Pricing Modal ===== */
.pricing-modal-backdrop {
    position: fixed;
    inset: 0;
    z-index: 9998;
    display: none;
    align-items: center;
    justify-content: center;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
    padding: 1rem;
}
.pricing-modal-backdrop.active {
    display: flex;
    animation: pricing-fade-in 0.25s ease-out;
}
@keyframes pricing-fade-in {
    from { opacity: 0; }
    to   { opacity: 1; }
}

.pricing-modal-container {
    position: relative;
    background: #ffffff;
    border-radius: 1.25rem;
    box-shadow: 0 25px 60px rgba(0, 0, 0, 0.25);
    max-width: 680px;
    width: 100%;
    padding: 2rem 1.5rem 1.5rem;
    animation: pricing-slide-up 0.3s ease-out;
    max-height: 90vh;
    overflow-y: auto;
}
.dark .pricing-modal-container {
    background: #1f2937;
    box-shadow: 0 25px 60px rgba(0, 0, 0, 0.5);
}
@keyframes pricing-slide-up {
    from { opacity: 0; transform: translateY(24px) scale(0.97); }
    to   { opacity: 1; transform: translateY(0) scale(1); }
}

.pricing-modal-close {
    position: absolute;
    top: 0.75rem;
    right: 0.75rem;
    width: 2rem;
    height: 2rem;
    border: none;
    background: transparent;
    color: #9ca3af;
    cursor: pointer;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
}
.pricing-modal-close:hover {
    background: #f3f4f6;
    color: #374151;
}
.dark .pricing-modal-close:hover {
    background: #374151;
    color: #e5e7eb;
}

/* -- Header -- */
.pricing-modal-header {
    text-align: center;
    margin-bottom: 1.5rem;
}
.pricing-modal-lock-icon {
    font-size: 2.5rem;
    color: #0cd9d6;
    margin-bottom: 0.5rem;
    display: inline-block;
}
.pricing-modal-title {
    font-size: 1.375rem;
    font-weight: 700;
    color: #111827;
    margin: 0 0 0.25rem;
}
.dark .pricing-modal-title {
    color: #f3f4f6;
}
.pricing-modal-subtitle {
    font-size: 0.875rem;
    color: #6b7280;
    margin: 0;
}
.dark .pricing-modal-subtitle {
    color: #9ca3af;
}

/* -- Cards Grid -- */
.pricing-modal-cards {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
    margin-bottom: 1rem;
}
@media (max-width: 560px) {
    .pricing-modal-cards {
        grid-template-columns: 1fr;
    }
}

/* -- Card -- */
.pricing-modal-card {
    border: 2px solid #e5e7eb;
    border-radius: 1rem;
    padding: 1.25rem;
    display: flex;
    flex-direction: column;
    transition: border-color 0.2s, box-shadow 0.2s;
    position: relative;
}
.pricing-modal-card:hover {
    border-color: #d1d5db;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.06);
}
.dark .pricing-modal-card {
    border-color: #374151;
}
.dark .pricing-modal-card:hover {
    border-color: #4b5563;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.2);
}

/* Highlighted card (Pro) */
.pricing-modal-card--highlighted {
    border-color: #0cd9d6;
    box-shadow: 0 0 0 1px rgba(12, 217, 214, 0.2);
}
.pricing-modal-card--highlighted:hover {
    border-color: #0cd9d6;
    box-shadow: 0 0 0 1px rgba(12, 217, 214, 0.3), 0 4px 16px rgba(12, 217, 214, 0.1);
}
.dark .pricing-modal-card--highlighted {
    border-color: #0cd9d6;
}
.dark .pricing-modal-card--highlighted:hover {
    border-color: #0cd9d6;
    box-shadow: 0 0 0 1px rgba(12, 217, 214, 0.3), 0 4px 16px rgba(12, 217, 214, 0.15);
}

/* -- Badge -- */
.pricing-card-badge {
    display: inline-block;
    font-size: 0.625rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    padding: 0.2rem 0.5rem;
    border-radius: 9999px;
    margin-bottom: 0.75rem;
    width: fit-content;
}
.pricing-card-badge--single {
    background: #f0f9ff;
    color: #0369a1;
}
.dark .pricing-card-badge--single {
    background: rgba(3, 105, 161, 0.15);
    color: #7dd3fc;
}
.pricing-card-badge--pro {
    background: rgba(12, 217, 214, 0.12);
    color: #0a9e9c;
}
.dark .pricing-card-badge--pro {
    background: rgba(12, 217, 214, 0.15);
    color: #0cd9d6;
}

/* -- Price Display -- */
.pricing-card-price {
    display: flex;
    align-items: baseline;
    gap: 0.25rem;
    margin-bottom: 0.5rem;
}
.pricing-card-amount {
    font-size: 2rem;
    font-weight: 800;
    color: #111827;
    line-height: 1;
}
.dark .pricing-card-amount {
    color: #f3f4f6;
}
.pricing-card-interval {
    font-size: 0.875rem;
    color: #6b7280;
    font-weight: 500;
}
.dark .pricing-card-interval {
    color: #9ca3af;
}

/* -- Description -- */
.pricing-card-desc {
    font-size: 0.8125rem;
    color: #4b5563;
    margin: 0 0 0.75rem;
    line-height: 1.5;
}
.dark .pricing-card-desc {
    color: #d1d5db;
}

/* -- Perks List -- */
.pricing-card-perks {
    list-style: none;
    padding: 0;
    margin: 0 0 1rem;
    flex: 1;
}
.pricing-card-perks li {
    display: flex;
    align-items: center;
    gap: 0.375rem;
    font-size: 0.75rem;
    color: #374151;
    padding: 0.2rem 0;
}
.dark .pricing-card-perks li {
    color: #d1d5db;
}
.pricing-perk-icon {
    font-size: 16px !important;
    color: #10b981;
    flex-shrink: 0;
}

/* -- CTA Buttons -- */
.pricing-card-btn {
    width: 100%;
    padding: 0.625rem 1rem;
    border: none;
    border-radius: 0.5rem;
    font-size: 0.8125rem;
    font-weight: 700;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    transition: all 0.2s;
}
.pricing-card-btn--single {
    background: #f3f4f6;
    color: #111827;
}
.pricing-card-btn--single:hover {
    background: #e5e7eb;
}
.dark .pricing-card-btn--single {
    background: #374151;
    color: #f3f4f6;
}
.dark .pricing-card-btn--single:hover {
    background: #4b5563;
}
.pricing-card-btn--pro {
    background: #0cd9d6;
    color: #262a36;
}
.pricing-card-btn--pro:hover {
    background: #0bbfbd;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(12, 217, 214, 0.3);
}
.pricing-card-btn.loading,
.pricing-card-btn:disabled {
    opacity: 0.7;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

/* -- Button Loader Spinner -- */
.pricing-btn-loader {
    animation: spin 1s linear infinite;
    width: 1.125rem;
    height: 1.125rem;
}

/* -- Footer -- */
.pricing-modal-footer {
    text-align: center;
    font-size: 0.6875rem;
    color: #9ca3af;
    margin: 0;
}
.dark .pricing-modal-footer {
    color: #6b7280;
}

/* -- Require Email lock indicator for free users -- */
.require-email-lock-hint {
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    font-size: 0.6875rem;
    color: #9ca3af;
    margin-left: 0.25rem;
    vertical-align: middle;
}
.require-email-lock-hint .material-symbols-outlined {
    font-size: 14px;
}
.dark .require-email-lock-hint {
    color: #6b7280;
}
