/* ── Toggle Butonu ── */
#cn-toggle {
    position: fixed;
    bottom: 24px;
    right: 24px;
    width: 52px;
    height: 52px;
    background: #2563eb;
    color: #fff;
    font-size: 22px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    box-shadow: 0 4px 16px rgba(37,99,235,.45);
    z-index: 9999;
    transition: transform .2s, background .2s;
    user-select: none;
}
#cn-toggle:hover {
    background: #1d4ed8;
    transform: scale(1.08);
}

/* ── Widget Kutusu ── */
#cn-widget {
    position: fixed;
    bottom: 86px;
    right: 24px;
    width: 310px;
    background: #fff;
    border-radius: 16px;
    box-shadow: 0 8px 32px rgba(0,0,0,.18);
    z-index: 9998;
    overflow: hidden;
    display: none;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    animation: cn-in .22s ease;
}

@keyframes cn-in {
    from { opacity: 0; transform: translateY(12px) scale(.97); }
    to   { opacity: 1; transform: translateY(0) scale(1); }
}

/* ── Header ── */
#cn-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 14px 16px;
    background: #2563eb;
    color: #fff;
}
#cn-header button {
    background: rgba(255,255,255,.2);
    border: none;
    color: #fff;
    font-size: 22px;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    cursor: pointer;
    line-height: 1;
    transition: background .15s;
    display: flex;
    align-items: center;
    justify-content: center;
}
#cn-header button:hover {
    background: rgba(255,255,255,.35);
}
#cn-month-label {
    font-weight: 700;
    font-size: 15px;
    letter-spacing: .3px;
}

/* ── Grid ── */
#cn-grid {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 2px;
    padding: 10px;
    background: #f8fafc;
}
.cn-day-name {
    text-align: center;
    font-size: 11px;
    font-weight: 700;
    color: #94a3b8;
    padding: 4px 0 6px;
    letter-spacing: .5px;
}
.cn-day {
    text-align: center;
    padding: 7px 2px;
    border-radius: 8px;
    font-size: 13px;
    cursor: default;
    transition: background .15s;
    min-height: 34px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-direction: column;
    position: relative;
    color: #334155;
}
.cn-day.has-note {
    background: #eff6ff;
    color: #2563eb;
    font-weight: 700;
    cursor: pointer;
}
.cn-day.has-note::after {
    content: '';
    display: block;
    width: 5px;
    height: 5px;
    background: #2563eb;
    border-radius: 50%;
    margin-top: 2px;
}
.cn-day.has-note:hover {
    background: #dbeafe;
}
.cn-day.today {
    background: #2563eb;
    color: #fff !important;
    font-weight: 700;
}
.cn-day.today::after {
    background: rgba(255,255,255,.7) !important;
}
.cn-day.today.has-note {
    background: #1d4ed8;
}
.cn-day.empty {
    cursor: default;
    background: transparent;
}

/* ── Popup ── */
#cn-popup {
    display: none;
    padding: 14px 16px 16px;
    border-top: 1px solid #e2e8f0;
    background: #fff;
    animation: cn-in .18s ease;
}
#cn-popup-title {
    font-weight: 700;
    font-size: 14px;
    color: #1e293b;
    margin-bottom: 6px;
}
#cn-popup-note {
    font-size: 13px;
    color: #475569;
    white-space: pre-wrap;
    line-height: 1.6;
}
