﻿/* ============================================================================
   Genesis Checkbox Component
   ========================================================================== */

    .genesis-checkbox {
        display: none !important;
    }

    .genesis-checkbox-label {
        display: flex !important;
        align-items: center;
        cursor: pointer;
        user-select: none;
        margin: 8px 0;
    }

    .genesis-checkbox-box {
        position: relative;
        flex: 0 0 20px;
        height: 20px;
        border-radius: 3px;
        border: 1px solid #9098A9;
        transition: all 0.2s ease;
        margin-right: 8px;
    }

        .genesis-checkbox-box svg {
            position: absolute;
            top: 3px;
            left: 2px;
            fill: none;
            stroke: #FFFFFF;
            stroke-width: 2;
            stroke-linecap: round;
            stroke-linejoin: round;
            stroke-dasharray: 16px;
            stroke-dashoffset: 16px;
            transition: all 0.3s ease;
            transition-delay: 0.1s;
        }

    .genesis-checkbox-label:hover .genesis-checkbox-box {
        border-color: #506EEC;
    }

    .genesis-checkbox:checked + .genesis-checkbox-label .genesis-checkbox-box {
        animation: gen-checkbox-wave 0.4s ease;
        background: linear-gradient(var(--base-btn-bg-angle), rgba(var(--base-btn-bg-color1), 1) 0%, rgba(var(--base-btn-bg-color2), 1) 100%);
        border-color: rgba(var(--base-btn-borders-hover), 1);
    }

        .genesis-checkbox:checked + .genesis-checkbox-label .genesis-checkbox-box svg {
            stroke-dashoffset: 0;
        }

    @keyframes genesis-checkbox-wave {
        50% {
            transform: scale(0.9);
        }
    }


    .calendar-cell {
        position: relative;
        vertical-align: top;
        padding: 6px;
    }
    /* Wrapper for event cards */
    .calendar-card-wrapper {
        position: absolute;
        top: 26px; /* space below date */
        left: 4px;
        right: 4px;
        bottom: 30px; /* space above add button */
        display: flex;
        flex-direction: column;
        gap: 6px;
        overflow-y: auto;
        z-index: 2;
    }

    .calendar .modal {
        position: fixed;
        top: 0;
        left: 0;
        width: 100%;
        height: 100%;
        background: rgba(0,0,0,0.4);
        display: flex;
        align-items: center;
        justify-content: center;
        z-index: 9999;
    }

        .calendar .modal.hidden {
            display: none;
        }
        
        .calendar .modal-content {
            background: white;
            padding: 20px;
            border-radius: 8px;
            width: 350px;
        }

    .calendar-grid td {
        position: relative;
        width: calc(100% / 7);
        aspect-ratio: 1 / 1;
        vertical-align: top;
        border: 1px solid #ccc;
        overflow: hidden;
    }

    .calendar-cell {
        height: 100%;
        padding: 4px;
        box-sizing: border-box;
    }

    .calendar-grid td::before {
        content: "";
        display: block;
        padding-top: 100%; /* height = width */
    }
    /* Date number */
    .calendar-cell-date {
        position: absolute;
        top: 6px;
        left: 6px;
        font-weight: 600;
        font-size: 14px;
        z-index: 2;
    }

    .calendar-cell {
        position: absolute;
        top: 0;
        left: 0;
        right: 0;
        bottom: 0;
    }

        .calendar-cell.is-today {
            background-color: rgba(0, 120, 255, 0.1);
            border-color: #0078ff;
        }

        .calendar-cell.is-outside {
            opacity: 0.5;
        }
