/**
 * Newbeings 1619 Calendar — Public Styles
 * Version: 3.0.2
 * Modern redesign — same color palette, contemporary feel
 */

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&display=swap');

.nb-calendar-container {
    width: 100%;
    max-width: 860px;
    margin: 0 auto 2.5em;
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
}

.nb-calendar-wrapper {
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 4px 6px -1px rgba(0,0,0,0.07), 0 20px 50px -10px rgba(0,0,0,0.15), 0 0 0 1px rgba(139,115,85,0.12);
    background: #fff;
}

.nb-calendar-nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 14px 20px;
    color: rgba(255,255,255,0.9);
    font-size: 0.8em;
    font-weight: 500;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.nb-nav-btn {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 7px 16px;
    border-radius: 8px;
    color: rgba(255,255,255,0.9) !important;
    text-decoration: none !important;
    font-size: 0.85em;
    font-weight: 600;
    letter-spacing: 0.02em;
    transition: all 0.18s ease;
    border: 1px solid rgba(255,255,255,0.2);
    backdrop-filter: blur(4px);
}

.nb-nav-btn:hover {
    background: rgba(255,255,255,0.15) !important;
    border-color: rgba(255,255,255,0.35);
    transform: translateY(-1px);
    text-decoration: none !important;
}

.nb-calendar-header {
    text-align: center;
    padding: 22px 0 18px;
    position: relative;
}

.nb-calendar-header::after {
    content: '';
    display: block;
    width: 48px;
    height: 3px;
    background: rgba(255,255,255,0.35);
    border-radius: 2px;
    margin: 10px auto 0;
}

.nb-calendar-header h2 {
    margin: 0;
    color: #fff;
    font-size: 1.65em;
    font-weight: 700;
    letter-spacing: -0.01em;
    text-shadow: 0 1px 3px rgba(0,0,0,0.2);
}

.nb-calendar-grid {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 0;
    background: #f0ebe2;
    border-top: 1px solid rgba(139,115,85,0.1);
}

.nb-calendar-day-header {
    text-align: center;
    padding: 11px 4px;
    font-size: 0.72em;
    font-weight: 700;
    color: #fff;
    letter-spacing: 0.06em;
    text-transform: uppercase;
}

.nb-calendar-day {
    min-height: 82px;
    padding: 10px 11px 8px;
    background: #fff;
    border: none;
    border-right: 1px solid rgba(139,115,85,0.08);
    border-bottom: 1px solid rgba(139,115,85,0.08);
    position: relative;
    transition: background 0.12s ease, transform 0.12s ease;
}

.nb-calendar-day:hover { background: #faf7f2; z-index: 1; }
.nb-calendar-day:nth-child(7n) { border-right: none; }
.nb-calendar-day:nth-last-child(-n+7) { border-bottom: none; }

.nb-calendar-day strong.nb-day-number {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 30px;
    height: 30px;
    font-size: 0.95em;
    font-weight: 600;
    color: #4a3728;
    border-radius: 8px;
    margin-bottom: 4px;
    transition: all 0.12s ease;
}

.nb-calendar-day.today {
    background: linear-gradient(135deg, #fffdf5 0%, #fff8e1 100%);
    border-right: 1px solid rgba(212,168,71,0.2);
    border-bottom: 1px solid rgba(212,168,71,0.2);
    position: relative;
}

.nb-calendar-day.today::before {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0;
    height: 3px;
    background: linear-gradient(90deg, #D4A847, #c49430);
}

.nb-calendar-day.today strong.nb-day-number {
    background: #D4A847;
    color: #fff;
    font-weight: 700;
    box-shadow: 0 2px 8px rgba(212,168,71,0.4);
}

.nb-event {
    font-size: 0.67em;
    font-weight: 500;
    line-height: 1.3;
    border-radius: 4px;
    padding: 3px 6px;
    margin-top: 3px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    cursor: help;
}

.nb-event-holiday, .nb-event-historical, .nb-event-cultural, .nb-event-community {
    background: #e8f5e9; color: #2e7d32; border-left: 3px solid #4caf50;
}
.nb-event-cosmic { background: #ede7f6; color: #4527a0; border-left: 3px solid #7c4dff; }
.nb-event-lunar  { background: #e8eaf6; color: #283593; border-left: 3px solid #3f51b5; }

.nb-alignment-container { padding: 36px 24px; text-align: center; background: #faf7f2; }
.nb-alignment-note { font-style: italic; margin-bottom: 24px; font-size: 0.93em; opacity: 0.8; }
.nb-alignment-days { display: flex; gap: 20px; justify-content: center; flex-wrap: wrap; }

.nb-alignment-day {
    border: 2px solid;
    border-radius: 14px;
    padding: 24px 40px;
    min-width: 220px;
    background: #fff;
    box-shadow: 0 4px 16px rgba(0,0,0,0.08);
    transition: transform 0.18s ease;
}
.nb-alignment-day:hover { transform: translateY(-2px); }
.nb-alignment-day h3 { margin: 0 0 6px; font-size: 1.15em; font-weight: 700; }
.nb-alignment-day.today { box-shadow: 0 8px 24px rgba(212,168,71,0.3); }

.nb-calendar-footer {
    text-align: center;
    padding: 12px;
    font-size: 0.78em;
    font-style: italic;
    font-weight: 500;
    letter-spacing: 0.02em;
    border-top: 1px solid rgba(139,115,85,0.1);
    background: #faf7f2;
    opacity: 0.85;
}

.nb-date-converter-wrapper {
    border: none;
    border-radius: 16px;
    padding: 28px 32px;
    max-width: 540px;
    background: #fff;
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    box-shadow: 0 4px 6px -1px rgba(0,0,0,0.07), 0 10px 30px -5px rgba(0,0,0,0.1), 0 0 0 1px rgba(139,115,85,0.1);
}

.nb-date-converter-wrapper h3 { margin: 0 0 4px; font-size: 1.25em; font-weight: 700; letter-spacing: -0.01em; }
.nb-date-converter-wrapper p  { margin: 0 0 16px; font-size: 0.88em; opacity: 0.75; }

.nb-converter-input-row { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }

#nb-date-input {
    border: 1.5px solid #e0d8cc;
    border-radius: 10px;
    padding: 9px 14px;
    font-size: 0.97em;
    font-family: inherit;
    background: #faf7f2;
    color: #2C1810;
    transition: border-color 0.15s ease, box-shadow 0.15s ease;
    outline: none;
}
#nb-date-input:focus { border-color: #D4A847; box-shadow: 0 0 0 3px rgba(212,168,71,0.15); background: #fff; }

#nb-convert-btn {
    padding: 9px 22px;
    border: none;
    border-radius: 10px;
    font-size: 0.97em;
    font-family: inherit;
    font-weight: 600;
    cursor: pointer;
    letter-spacing: 0.01em;
    transition: all 0.18s ease;
    box-shadow: 0 2px 8px rgba(139,115,85,0.25);
}
#nb-convert-btn:hover  { transform: translateY(-1px); box-shadow: 0 4px 14px rgba(139,115,85,0.35); }
#nb-convert-btn:active { transform: translateY(0); }

.nb-conversion-result {
    margin-top: 16px;
    padding: 14px 18px;
    background: linear-gradient(135deg, #faf7f2, #f5ede0);
    border: 1px solid rgba(139,115,85,0.15);
    border-radius: 10px;
    font-size: 0.95em;
    line-height: 1.8;
    box-shadow: inset 0 1px 3px rgba(0,0,0,0.04);
}

.nb-error { color: #c0392b; font-weight: 500; }
.nb-current-date { font-weight: 700; letter-spacing: -0.01em; }

@media (max-width: 640px) {
    .nb-calendar-wrapper { border-radius: 12px; }
    .nb-calendar-header h2 { font-size: 1.3em; }
    .nb-calendar-day-header { font-size: 0.62em; padding: 9px 2px; letter-spacing: 0.02em; }
    .nb-calendar-day { min-height: 56px; padding: 7px 6px 5px; }
    .nb-calendar-day strong.nb-day-number { width: 24px; height: 24px; font-size: 0.82em; border-radius: 6px; }
    .nb-event { display: none; }
    .nb-calendar-day.has-events::after { content: '•'; display: block; font-size: 1.1em; line-height: 1; margin-top: 2px; color: #7c4dff; }
    .nb-calendar-day.today::before { height: 2px; }
    .nb-date-converter-wrapper { padding: 20px 18px; border-radius: 12px; }
}
