/* Floating Calendar Widget - WhatsApp Style Bubble */

/* Base Widget Styles */
.floating-calendar {
    position: fixed;
    bottom: 30px;
    right: 20px;
    width: 320px;
    background: white;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
    border-radius: 12px;
    z-index: 1060;
    transition: all 0.4s cubic-bezier(0.68, -0.55, 0.265, 1.55);
    display: flex;
    flex-direction: column;
    overflow: hidden;
    border: 1px solid rgba(0, 0, 0, 0.05);
    transform-origin: bottom right;
}

/* Pulse Animation for Bubble */
@keyframes bubble-pulse {

    0%,
    100% {
        box-shadow: 0 4px 12px rgba(220, 20, 60, 0.3);
    }

    50% {
        box-shadow: 0 6px 20px rgba(220, 20, 60, 0.5);
    }
}

/* ====== MINIMIZED STATE (BUBBLE) ====== */
.floating-calendar.minimized {
    width: 60px;
    height: 60px;
    right: 20px;
    border-radius: 50%;
    cursor: pointer;
    box-shadow: 0 4px 16px rgba(220, 20, 60, 0.35);
    animation: bubble-pulse 2s ease-in-out infinite;
    overflow: visible;
}

/* Hide body and toggle in minimized state */
.floating-calendar.minimized .floating-cal-body,
.floating-calendar.minimized .toggle-icon {
    display: none !important;
}

/* Hide only text in logo, keep icon visible */
.floating-calendar.minimized .calander-logo span,
.floating-calendar.minimized .cal-header-date {
    display: none !important;
}

/* Adjust header for perfect circular bubble */
.floating-calendar.minimized .floating-cal-header {
    height: 100%;
    width: 100%;
    padding: 0;
    justify-content: center;
    align-items: center;
    border-radius: 50%;
    box-shadow: none;
    flex-direction: row;
}

.floating-calendar.minimized .cal-header-brand {
    display: flex !important;
    align-items: center;
    justify-content: center;
}

/* Center the icon perfectly */
.floating-calendar.minimized .calander-logo {
    margin: 0;
    display: flex !important;
    align-items: center;
    justify-content: center;
}

.floating-calendar.minimized .calander-logo i {
    font-size: 32px;
    color: white;
    margin: 0;
    display: block !important;
}

/* Hover effect on bubble */
.floating-calendar.minimized:hover {
    transform: scale(1.05);
    box-shadow: 0 6px 20px rgba(220, 20, 60, 0.45);
}

/* ====== EXPANDED STATE (FULL CALENDAR) ====== */
.floating-cal-header {
    background: #DC143C;
    color: white;
    padding: 0 20px;
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-weight: bold;
    border-radius: 12px 12px 0 0;
    height: 60px;
    user-select: none;
    transition: background 0.3s;
    flex-direction: row-reverse;
    /* Right alignment */
}

.floating-cal-header:hover {
    background: #c0392b;
}

.cal-header-brand {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: flex-end;
    /* Right align text */
    text-align: right;
}

.calander-logo {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 20px;
    font-family: 'Outfit', sans-serif;
    letter-spacing: 0.5px;
    margin-bottom: -2px;
}

.calander-logo i {
    font-size: 18px;
    color: #ffdae0;
    transition: transform 0.3s ease;
}

.floating-cal-header:hover .calander-logo i {
    transform: scale(1.1);
    color: white;
}

.cal-header-date {
    font-size: 11px;
    font-weight: normal;
    color: #ffdae0;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.toggle-icon {
    font-size: 18px;
    transition: transform 0.3s;
}

.toggle-icon i {
    transition: transform 0.3s;
}

/* Rotate toggle icon when expanded */
.floating-calendar:not(.minimized) .toggle-icon i {
    transform: rotate(180deg);
}

/* Calendar Body */
.floating-cal-body {
    padding: 15px;
    background: white;
}

/* Calendar Navigation */
.cal-nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
    padding-bottom: 10px;
    border-bottom: 1px solid #eee;
}

.cal-nav button {
    background: #f8f9fa;
    border: 1px solid #eee;
    border-radius: 50%;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #555;
    cursor: pointer;
    transition: all 0.2s;
}

.cal-nav button:hover {
    background: #DC143C;
    color: white;
    border-color: #DC143C;
}

.cal-month-display {
    font-weight: bold;
    color: #2C3E50;
    font-size: 16px;
}

/* Calendar Grid */
.cal-days,
.cal-grid {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    text-align: center;
}

.cal-days {
    font-weight: bold;
    font-size: 13px;
    color: #666;
    margin-bottom: 10px;
}

.cal-date {
    padding: 8px 0;
    cursor: pointer;
    border-radius: 50%;
    aspect-ratio: 1/1;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    transition: all 0.2s;
}

.cal-date:hover {
    background-color: #fce4ec;
    color: #DC143C;
}

.cal-selected {
    background-color: #DC143C !important;
    color: white !important;
}

.cal-today {
    border: 2px solid #DC143C;
    font-weight: bold;
    color: #DC143C;
}

/* Mobile Responsiveness */
@media (max-width: 768px) {
    .floating-calendar {
        width: 280px;
        right: 10px;
        bottom: 20px;
    }

    .floating-calendar.minimized {
        right: 10px;
        bottom: 20px;
    }
}