/* Define CSS variables for colors */
:root {
    --primary-color: #2196F3;
    --secondary-color: #ffffff;
    --text-color: #333333;
    --highlight-color: #E3F2FD;
    --highlight-border-color: #2196F3;
    --disabled-color: #f5f5f5;
    --hover-color: #E3F2FD;
    --saturday-color: #f70303;
    --saturday-faded-color: rgba(253, 0, 0, 0.5);
    --current-day-color: #2196F3;
    --toggle-bg-color: #07518f;
    --toggle-slider-color: #ffffff;
    --toggle-checked-bg-color: #1976D2;
    --toggle-checked-slider-color: #ffffff;
    --today-link-bg-color: #2196F3;
    --today-link-text-color: #ffffff;
    --prev-next-hover-bg-color: #1976D2;
    /* Animation variables */
    --toggle-animation-duration: 0.3s;
    --calendar-animation-duration: 0.4s;
    /* Select2-like variables */
    --select-bg: #ffffff;
    --select-text: #333333;
    --select-border: #2196F3;
    --select-hover-bg: #E3F2FD;
    --select-focus-border: #2196F3;
    --select-arrow-color: #2196F3;
    --highlight-color-rgb: 227, 242, 253;
}

/* Define CSS variables for purple theme */
.ndp-theme-purple {
    --primary-color: #4f46e5;
    --secondary-color: #eef2ff;
    --text-color: #4f46e5;
    --highlight-color: #c7d2fe;
    --highlight-border-color: #a5b4fc;
    --disabled-color: #f5f3ff;
    --hover-color: #c7d2fe;
    --saturday-color: #dc2626;
    --saturday-faded-color: rgba(220, 38, 38, 0.9);
    --current-day-color: #4338ca;
    --toggle-bg-color: #3730a3;
    --toggle-slider-color: #eef2ff;
    --toggle-checked-bg-color: #3730a3;
    --toggle-checked-slider-color: #eef2ff;
    --today-link-bg-color: #4f46e5;
    --today-link-text-color: #fff;
    --prev-next-hover-bg-color: #3730a3;
    /* Select2-like variables */
    --select-bg: #ffffff;
    --select-text: #4f46e5;
    --select-border: #c7d2fe;
    --select-hover-bg: #eef2ff;
    --select-focus-border: #4f46e5;
    --select-arrow-color: #4f46e5;
    --highlight-color-rgb: 199, 210, 254;
}


/* Define CSS variables for dark theme */
.ndp-theme-dark {
    --primary-color: #363636;
    --secondary-color: #242424;
    --text-color: #ffffff;
    --highlight-color: #404040;
    --highlight-border-color: #525252;
    --disabled-color: #383838;
    --hover-color: #454545;
    --saturday-color: #ff4d4d;
    --saturday-faded-color: rgba(255, 77, 77, 0.5);
    --current-day-color: #ff8c00;
    --toggle-bg-color: #525252;
    --toggle-slider-color: #ffffff;
    --toggle-checked-bg-color: #525252;
    --toggle-checked-slider-color: #ffffff;
    --today-link-bg-color: #242424;
    --today-link-text-color: #ffffff;
    --prev-next-hover-bg-color: #ff8c00;
    /* Select2-like variables */
    --select-bg: #242424;
    --select-text: #ffffff;
    --select-border: #383838;
    --select-hover-bg: #363636;
    --select-focus-border: #525252;
    --select-arrow-color: #8a8a8a;
    --highlight-color-rgb: 64, 64, 64;
}

/* Define CSS variables for blue accent theme */
.ndp-theme-blue {
    --primary-color: #1e88e5;
    --secondary-color: #e8f0fe;
    --text-color: #1565c0;
    --highlight-color: #c5dafc;
    --highlight-border-color: #90caf9;
    --disabled-color: #e0e0e0;
    --hover-color: #42a5f5;
    --saturday-color: rgb(238, 77, 77);
    --saturday-faded-color: rgba(238, 77, 77, 0.5);
    --current-day-color: #1565c0;
    --toggle-bg-color: #1565c0;
    --toggle-slider-color: #ffffff;
    --toggle-checked-bg-color: #1e88e5;
    --toggle-checked-slider-color: #ffffff;
    --today-link-bg-color: #1e88e5;
    --today-link-text-color: #fff;
    --prev-next-hover-bg-color: #1565c0;
    /* Select2-like variables */
    --select-bg: #ffffff;
    --select-text: #1565c0;
    --select-border: #c5dafc;
    --select-hover-bg: #e8f0fe;
    --select-focus-border: #1e88e5;
    --select-arrow-color: #1e88e5;
    --highlight-color-rgb: 197, 218, 252;
}

/* Define CSS variables for green theme */
.ndp-theme-green {
    --primary-color: #10b981;
    --secondary-color: #059669;
    --text-color: #ffffff;
    --highlight-color: #6ee7b7;
    --highlight-border-color: #047857;
    --disabled-color: #e0e0e0;
    --hover-color: #047857;
    --saturday-color: rgb(238, 77, 77);
    --saturday-faded-color: rgba(238, 77, 77, 0.5);
    --current-day-color: #10b981;
    --toggle-bg-color: #10b981;
    --toggle-slider-color: #ffffff;
    --toggle-checked-bg-color: #059669;
    --toggle-checked-slider-color: #ffffff;
    --today-link-bg-color: #10b981;
    --today-link-text-color: #ffffff;
    --prev-next-hover-bg-color: #059669;
    /* Select2-like variables */
    --select-bg: #ffffff;
    --select-text: #10b981;
    --select-border: #a7f3d0;
    --select-hover-bg: #ecfdf5;
    --select-focus-border: #10b981;
    --select-arrow-color: #10b981;
    --highlight-color-rgb: 110, 231, 183;
}
/* Define CSS variables for orange theme */
.ndp-theme-orange {
    --primary-color: #ff6b01;
    --secondary-color: #fff5eb;
    --text-color: #ff6b01;
    --highlight-color: #ffe0c4;
    --highlight-border-color: #ffb573;
    --disabled-color: #e0e0e0;
    --hover-color: #ffd4b0;
    --saturday-color: rgb(238, 77, 77);
    --saturday-faded-color: rgba(238, 77, 77, 0.5);
    --current-day-color: #ff6b01;
    --toggle-bg-color: #9a9999;
    --toggle-slider-color: #f6f6f6;
    --toggle-checked-bg-color: #9a9999;
    --toggle-checked-slider-color: #f6f6f6;
    --today-link-bg-color: #ff6b01;
    --today-link-text-color: #fff;
    --prev-next-hover-bg-color: #cc5500;
    /* Select2-like variables */
    --select-bg: #ffffff;
    --select-text: #ff6b01;
    --select-border: #ffcca3;
    --select-hover-bg: #fff5eb;
    --select-focus-border: #ff6b01;
    --select-arrow-color: #ff6b01;
    --highlight-color-rgb: 255, 224, 196;
}

/* Define CSS variables for red theme */
.ndp-theme-red {
    --primary-color: #dc3545;
    --secondary-color: #fff5f5;
    --text-color: #060606;
    --highlight-color: #ffd7d7;
    --highlight-border-color: #ffb3b3;
    --disabled-color: #e0e0e0;
    --hover-color: #ffcccc;
    --saturday-color: rgb(244, 8, 8);
    --saturday-faded-color: rgba(238, 77, 77, 0.5);
    --current-day-color: #dc3545;
    --toggle-bg-color: #af0000;
    --toggle-slider-color: #f6f6f6;
    --toggle-checked-bg-color: #9a9999;
    --toggle-checked-slider-color: #f6f6f6;
    --today-link-bg-color: #dc3545;
    --today-link-text-color: #fff;
    --prev-next-hover-bg-color: #c82333;
    /* Select2-like variables */
    --select-bg: #ffffff;
    --select-text: #dc3545;
    --select-border: #ffb3b3;
    --select-hover-bg: #fff5f5;
    --select-focus-border: #dc3545;
    --select-arrow-color: #dc3545;
    --highlight-color-rgb: 255, 215, 215;
}

.ndp-header {
    font-weight: 700;
    text-align: center;

}

.ndp-days th {
    padding-bottom: 10px;
    text-align: center;
}

div#ndp-nepali-box {
    font-family: "Trebuchet MS", Tahoma, Verdana, Arial, sans-serif;
    border: 1px solid var(--primary-color);
    background-color: var(--secondary-color);
    position: absolute;
    z-index: 9999;
    color: var(--text-color);
    padding: 1px;
    margin-top: 1px;
    min-width: 280px;
    max-width: 100%;
    width: auto;
    height: auto;
}

div#ndp-table-div {
    margin: 0;
    position: relative;
    width: 100%;
}

div#ndp-table-div table {
    border-spacing: 2px;
    border-collapse: separate;
}

div#ndp-nepali-box td.ndp-date {
    margin: 1px;
    padding: 1px 2px;
    color: var(--text-color);
    text-align: center;
    width: 45px;
    height: 45px;
    position: relative;
    box-sizing: border-box;
}

div#ndp-nepali-box td.ndp-selected {
    display: block;
    border: 1px solid var(--highlight-border-color);
    background: var(--highlight-color);
    text-align: center;
    text-decoration: none;
    font-size: 16px;
    width: 100%;
    height: 100%;
    text-align: center;
    position: relative;
    box-sizing: border-box;
}

div#ndp-nepali-box td.ndp-current {
    margin: 1px;
    padding: 1px 2px;
    background: var(--primary-color);
    text-align: center;
    height: auto;
    width: 45px;
}

div#ndp-nepali-box td.ndp-current a {
    display: block;
    color: var(--current-day-color);
    text-decoration: none;
    font-size: 14px;
    width: 100%;
    height: 100%;
    text-align: center;
    position: relative;
    box-sizing: border-box;
}

div#ndp-nepali-box td.ndp-date a {
    display: block;
    color: var(--text-color);
    text-decoration: none;
    width: 100%;
    height: 100%;
    text-align: center;
    position: relative;
    box-sizing: border-box;
}

div#ndp-nepali-box td.ndp-date:hover {
    text-align: center;
    background-color: var(--hover-color);

}

div#ndp-nepali-box td.ndp-date a:hover {
    color: #1e9ff2;
}

div#ndp-nepali-box table,
div#ndp-nepali-box td,
div#ndp-nepali-box tr {
    font-size: 16px;
    height: 20px;
    line-height: 20px;
    border-radius: 3px;
}

.ndp-next,
.ndp-prev {
    position: absolute;
    color: #fff;
    top: 10px;
    font-weight: bold;
    border-radius: 50%;
    width: 30px;
    height: 30px;
    border: 2px solid #fff;
    display: flex;
    justify-content: center;
    align-items: center;
}

.ndp-prev {
    left: 15px;
}

.ndp-next {
    right: 15px;
}

.ndp-prev:hover,
.ndp-next:hover {
    color: #fff;
    border: 2px solid #fff;
    background-color: var(--prev-next-hover-bg-color);
}

div#ndp-nepali-box a {
    text-decoration: none;
}

.ndp-header {
    background: var(--primary-color);
    color: #fff;
    font-weight: bold;
    font-size: 13px;
    margin: 0px;
    padding: 0px;
}

/* Replace the existing month/year select styles with Select2-like styling */
#currentMonth #ndp-month-select,
#currentMonth #ndp-year-select {
    color: var(--select-text);
    font-size: 13px;
    font-weight: 500;
    padding: 4px 25px 4px 10px;
    height: auto !important;
    border-radius: 4px;
    border: 1px solid var(--select-border);
    margin-bottom: 0px;
    background-color: var(--select-bg);
    opacity: 1;
    appearance: none;
    -webkit-appearance: none;
    -moz-appearance: none;
    background-image: url("data:image/svg+xml;charset=UTF-8,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23888' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3e%3cpolyline points='6 9 12 15 18 9'%3e%3c/polyline%3e%3c/svg%3e");
    background-repeat: no-repeat;
    background-position: right 8px center;
    background-size: 12px;
    cursor: pointer;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
    transition: all 0.2s ease-in-out;
}

#currentMonth #ndp-month-select {
    margin-right: 3px;
}

#currentMonth #ndp-month-select:hover,
#currentMonth #ndp-year-select:hover {
    border-color: var(--select-focus-border);
    background-color: var(--select-hover-bg);
}

#currentMonth #ndp-month-select:focus,
#currentMonth #ndp-year-select:focus {
    border-color: var(--primary-color);
    outline: none;
    box-shadow: 0 0 0 2px rgba(var(--primary-color-rgb, 51, 51, 51), 0.2);
}

/* Input group compatibility - improved sizing */
.input-group .ndp-input-container {
    flex: 1 1 auto;
    width: 1%;
    /*min-width: 200px; !* Ensure a minimum width *!*/
}

.input-group .ndp-nepali-calendar {
    border-radius: 0.25rem;
    width: 100%; /* Ensure the input takes full width of its container */
    flex: 1 1 auto;
}

.input-group > .ndp-input-container:not(:first-child) .ndp-nepali-calendar {
    border-top-left-radius: 0;
    border-bottom-left-radius: 0;
}

.input-group > .ndp-input-container:not(:last-child) .ndp-nepali-calendar {
    border-top-right-radius: 0;
    border-bottom-right-radius: 0;
}

/* Fix the flex behavior for date inputs in input groups */
/* .input-group > .input-group-prepend > .input-group-text,
.input-group > .input-group-append > .input-group-text {
    flex: 0 0 auto;
} */

.ndp-corner-all,
.ndp-corner-left,
.ndp-corner-tl,
.ndp-corner-top {
    -moz-border-radius-topleft: 5px;
    -webkit-border-top-left-radius: 5px;
    -khtml-border-top-left-radius: 5px;
    border-top-left-radius: 5px;
}

.ndp-corner-all,
.ndp-corner-right,
.ndp-corner-top,
.ndp-corner-tr {
    -moz-border-radius-topright: 5px;
    -webkit-border-top-right-radius: 5px;
    -khtml-border-top-right-radius: 5px;
    border-top-right-radius: 5px;
}

.ndp-corner-all,
.ndp-corner-bl,
.ndp-corner-bottom,
.ndp-corner-left {
    -moz-border-radius-bottomleft: 5px;
    -webkit-border-bottom-left-radius: 5px;
    -khtml-border-bottom-left-radius: 5px;
    border-bottom-left-radius: 5px;
}

.ndp-corner-all,
.ndp-corner-bottom,
.ndp-corner-br,
.ndp-corner-right {
    -moz-border-radius-bottomright: 5px;
    -webkit-border-bottom-right-radius: 5px;
    -khtml-border-bottom-right-radius: 5px;
    border-bottom-right-radius: 5px;
}

td.ndp-disabled,
a.ndp-disabled {
    opacity: 0.5;
    pointer-events: none;
    /* background-color: var(--disabled-color) !important; */
}

a.ndp-disabled {
    pointer-events: none;
}

.ndp-date a span.ndp-ad-day {
    font-size: 9px;
    color: #fff;
    position: absolute;
    bottom: 2px;
    right: 2px;
}

.ndp-date a span.ndp-nep-day {
    font-size: 15px;
    color: var(--text-color);
    position: absolute;
    font-weight: bold;
    top: 2px;
    left: 2px;
}

.ndp-current a span.ndp-ad-day {
    font-size: 9px;
    color: #fff !important;
    position: absolute;
    bottom: 2px;
    right: 2px;
}

.ndp-current a span.ndp-nep-day {
    font-size: 15px;
    color: #fff !important;
    position: absolute;
    font-weight: bold;
    top: 2px;
    left: 2px;
}

.ndp-faded {
    opacity: 0.5;
}

.ndp-saturday,
.ndp-faded .ndp-primary-day.ndp-saturday,
.ndp-faded .ndp-secondary-day.ndp-saturday {
    color: var(--saturday-color) !important;
}

.ndp-date.ndp-faded .ndp-primary-day {
    color: var(--text-color);
}

.ndp-date.ndp-faded .ndp-secondary-day {
    color: var(--text-color);
}

.ndp-date.ndp-faded .ndp-primary-day.ndp-saturday {
    color: var(--saturday-faded-color) !important;
}

.ndp-date.ndp-faded .ndp-secondary-day.ndp-saturday {
    color: var(--saturday-faded-color) !important;
}

.ndp-selected a span.ndp-ad-day {
    font-size: 9px;
    color: #567b97;
    position: absolute;
    bottom: 2px;
    right: 2px;
}

.ndp-selected a span.ndp-nep-day {
    font-size: 15px;
    position: absolute;
    font-weight: bold;
    color: var(--text-color);
    top: 2px;
    left: 2px;
}

.ndp-today-link {
    text-align: center;
    margin-top: 5px;
    background-color: var(--today-link-bg-color);
    border-bottom-left-radius: 5px;
    border-bottom-right-radius: 5px;
    font-weight: bold;
}

.ndp-today-link a {
    color: var(--today-link-text-color);
    text-decoration: none;
    font-size: 14px;
    transition: all 0.3s ease;
    padding: 5px 10px;
    border-radius: 4px;
    display: inline-block;
}

.ndp-today-link a:hover {
    background-color: rgba(255, 255, 255, 0.2);
    transform: scale(1.05);
}

/* Animation for "Go to Today" link */
@keyframes todayPulse {
    0% { transform: scale(1); opacity: 1; }
    50% { transform: scale(1.1); opacity: 0.8; }
    100% { transform: scale(1); opacity: 1; }
}

.ndp-today-pulse {
    animation: todayPulse 0.4s ease-in-out;
}

.ndp-selected a {
    display: block;
    width: 100%;
    height: 100%;
}

.ndp-header {
    padding: 1px;
}

.ndp-header-content {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin: 5px;
}

.ndp-calendar-toggle-row {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0;
    margin-top: 0;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

/* Improved smooth toggle switch */
.ndp-toggle-container {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 5px;
    justify-content: space-between;
    width: 100%;
    will-change: transform;
}

.ndp-toggle-text {
    font-size: 15px;
    font-weight: bold;
    transition: all 0.4s ease;
    user-select: none;
    cursor: default;
    will-change: transform, color;
}

.ndp-toggle-text.ndp-active {
    transform: scale(1.1);
}

.ndp-switch {
    position: relative;
    display: inline-block;
    width: 42px;
    height: 21px;
    margin: 0;
    transition: transform 0.2s ease;
    will-change: transform;
    z-index: 1;
}

.ndp-switch:hover {
    transform: scale(1.05);
}

.ndp-switch:active {
    transform: scale(0.95);
}

.ndp-switch input {
    opacity: 0;
    width: 0;
    height: 0;
}

.ndp-slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: var(--toggle-bg-color);
    transition: background-color 0.4s ease;
    border-radius: 20px;
    box-shadow: inset 0 1px 3px rgba(0,0,0,0.1);
    will-change: background-color;
    overflow: hidden;
}

.ndp-slider:hover {
    box-shadow: inset 0 1px 3px rgba(0,0,0,0.2);
}

/* Add a subtle background animation for the toggle */
.ndp-slider:after {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(90deg, var(--toggle-bg-color), var(--toggle-checked-bg-color));
    opacity: 0.3;
    transition: transform 0.4s cubic-bezier(0.45, 0.05, 0.3, 1.3);
    transform: translateX(-100%);
    will-change: transform;
}

input:checked + .ndp-slider:after {
    transform: translateX(0);
}

.ndp-slider:before {
    position: absolute;
    content: "";
    height: 17px;
    width: 17px;
    left: 2px;
    bottom: 2px;
    background-color: var(--toggle-slider-color);
    transition: transform 0.4s cubic-bezier(0.45, 0.05, 0.3, 1.3);
    border-radius: 50%;
    box-shadow: 0 1px 3px rgba(0,0,0,0.2);
    will-change: transform;
    z-index: 2;
}

/* More natural toggle motion */
input:checked + .ndp-slider:before {
    transform: translateX(21px);
}

/* Current month/year display */
#currentMonth {
    flex-grow: 1;
    text-align: center;
    font-size: 14px;
    font-weight: bold;
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 6px;
}

.ndp-nepali-box.ndp-bs-calendar .ndp-nep-day {
    font-size: 14px;
    font-weight: bold;
}

.ndp-nepali-box.ndp-bs-calendar .ndp-ad-day {
    font-size: 11px;
    color: #666;
}

.ndp-nepali-box.ndp-ad-calendar .ndp-ad-day {
    font-size: 14px;
    font-weight: bold;
}

.ndp-nepali-box.ndp-ad-calendar .ndp-nep-day {
    font-size: 11px;
    color: #666;
}

.ndp-primary-day {
    font-size: 16px;
    color: var(--text-color);
    position: absolute;
    font-weight: bold;
    top: 2px;
    left: 2px;
}

.ndp-secondary-day {
    font-size: 11px;
    color: var(--text-color);
    position: absolute;
    bottom: 2px;
    right: 2px;
}

.ndp-primary-day.ndp-saturday,
.ndp-secondary-day.ndp-saturday {
    color: #ff0000;
}

.ndp-current .ndp-primary-day,
.ndp-current .ndp-secondary-day {
    color: #ffffff !important;
}

.ndp-selected .ndp-primary-day,
.ndp-selected .ndp-secondary-day {
    color: var(--text-color);
}

.ndp-date:hover:not(.ndp-current) .ndp-primary-day,
.ndp-date:hover:not(.ndp-current) .ndp-secondary-day {
    color: var(--text-color);
}

.ndp-current {
    background-color: var(--primary-color);
    border-radius: 4px;
}

/* Table cell styles */
.ndp-days td {
    padding: 1px;
    text-align: center;
}

.ndp-month-year-container.ndp-ad-mode,
.ndp-month-year-container.ndp-bs-mode {
    display: flex;
    justify-content: flex-end;
    gap: 5px;
    padding-right: 5px;
    padding-top: 5px;
}

.ndp-english-months,
.ndp-nepali-months {
    font-size: 14px;
    color: #fff;
    text-align: left;
    margin-right: 10px;
    padding: 0;
    flex-grow: 1;
    font-weight: 600;
}

.ndp-english-months {
    font-family: Arial, sans-serif;
}

#ndp-month-select,
#ndp-year-select {
    padding: 2px 5px;
    border: 1px solid #ccc;
    border-radius: 3px;
    font-size: 13px;
}

.ndp-triggerButtonClass {
    background-color: transparent;
    border: none;
    border-radius: 0;
    padding: 0;
    margin: 0;
    font-size: 16px;
}


/* Input container styling */
.ndp-input-container {
    position: relative;
    display: inline-block;
    width: 100%; /* Default to 100% of parent */
}

/* Style for inputs with trigger buttons */
.ndp-input-container.ndp-has-trigger .ndp-nepali-calendar {
    padding-right: 35px; /* Make space for the trigger button */
}

/* Style for inputs without trigger buttons */
.ndp-input-container.ndp-no-trigger .ndp-nepali-calendar {
    padding-right: 10px; /* Normal right padding */
}

/* Base input styling - simplified for input group compatibility */
.ndp-nepali-calendar {
    width: 100%;
    box-sizing: border-box;
}


/* Calendar content unified transitions */
.ndp-calendar-body-container {
    position: relative;
    width: 100%;
    overflow: hidden;
    will-change: opacity, transform;
}

#ndp-table-div table,
.ndp-english-months,
.ndp-nepali-months {
    transition: opacity 0.4s ease, transform 0.4s ease;
    will-change: opacity, transform;
}

.ndp-calendar-fade-out {
    opacity: 0;
    transform: translateY(5px);
}

.ndp-calendar-fade-in {
    opacity: 1;
    transform: translateY(0);
}

/* Calendar appear/disappear animation - make it smoother */
#ndp-nepali-box {
    transition: opacity 0.25s ease-in-out, transform 0.25s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

#ndp-nepali-box.ndp-calendar-entering {
    opacity: 0;
    transform: translateY(-10px) scale(0.98);
}

#ndp-nepali-box.ndp-calendar-visible {
    opacity: 1;
    transform: translateY(0) scale(1);
}

#ndp-nepali-box.ndp-calendar-leaving {
    opacity: 0;
    transform: translateY(10px) scale(0.98);
}

/* For date cell animations */
.ndp-date, .ndp-current, .ndp-selected {
    transition: transform 0.15s ease, background-color 0.2s ease, box-shadow 0.2s ease;
}

.ndp-date:hover, .ndp-selected:hover, .ndp-current:hover {
    transform: scale(1.05);
    box-shadow: 0 2px 5px rgba(0,0,0,0.15);
    z-index: 2;
    position: relative;
}

/* Month/year switcher animations */
.ndp-month-year-container select {
    transition: background-color 0.2s ease;
}

/* Calendar navigation animations */
.ndp-prev, .ndp-next {
    transition: transform 0.2s ease, background-color 0.2s ease;
    cursor: pointer;
    z-index: 5;
}

.ndp-prev:active, .ndp-next:active {
    transform: scale(0.9);
}

/* Today link animation */
.ndp-today-link a {
    transition: background-color 0.2s ease, transform 0.2s ease;
}

.ndp-today-link a:hover {
    transform: scale(1.02);
}

/* Date selection animation */
td.ndp-calendar-fade-out {
    animation: cell-pulse 0.3s ease;
}

@keyframes cell-pulse {
    0% { transform: scale(1); background-color: inherit; }
    50% { transform: scale(1.1); background-color: var(--highlight-color); }
    100% { transform: scale(1); background-color: inherit; }
}

/* Month swipe animations */
@keyframes slideInRight {
    from {
        transform: translateX(100%);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

@keyframes slideInLeft {
    from {
        transform: translateX(-100%);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

@keyframes slideOutRight {
    from {
        transform: translateX(0);
        opacity: 1;
    }
    to {
        transform: translateX(100%);
        opacity: 0;
    }
}

@keyframes slideOutLeft {
    from {
        transform: translateX(0);
        opacity: 1;
    }
    to {
        transform: translateX(-100%);
        opacity: 0;
    }
}

/* Animation classes for month changes */
.ndp-slide-in-right {
    animation: slideInRight 0.3s forwards cubic-bezier(0.25, 0.46, 0.45, 0.94);
    position: relative;
    z-index: 2;
}

.ndp-slide-in-left {
    animation: slideInLeft 0.3s forwards cubic-bezier(0.25, 0.46, 0.45, 0.94);
    position: relative;
    z-index: 2;
}

.ndp-slide-out-right {
    animation: slideOutRight 0.3s forwards cubic-bezier(0.25, 0.46, 0.45, 0.94);
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 1;
}

.ndp-slide-out-left {
    animation: slideOutLeft 0.3s forwards cubic-bezier(0.25, 0.46, 0.45, 0.94);
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 1;
}

/* Swipe indicator for mobile devices */
.ndp-swipe-hint {
    position: absolute;
    top: 50%;
    font-size: 24px;
    color: rgba(150, 150, 150, 0.3);
    opacity: 0; /* Always keep it hidden */
    transition: opacity 0.3s ease, transform 0.3s ease;
    z-index: 3;
    pointer-events: none;
    display: none; /* Hide completely */
}

.ndp-swipe-hint-left {
    right: 10px;
    transform: translateY(-50%) translateX(20px);
}

.ndp-swipe-hint-right {
    left: 10px;
    transform: translateY(-50%) translateX(-20px);
}

/* Remove the hover effect that shows the arrows */
.ndp-calendar-body-container:hover .ndp-swipe-hint,
.ndp-calendar-body-container:active .ndp-swipe-hint {
    opacity: 0; /* Keep hidden even on hover */
    transform: translateY(-50%) translateX(0);
}

/* Add hover effect to improve navigation indication */
.ndp-prev:hover:before,
.ndp-next:hover:before {
    /* Remove the content and effects */
    content: none;
    display: none;
}

/* Responsive design for mobile */
@media (max-width: 480px) {
    div#ndp-nepali-box {
        min-width: 260px;
        max-width: 95vw; /* Use viewport width for mobile */
        left: 50% !important; /* Center horizontally */
        transform: translateX(-50%); /* Center technique */
    }

    div#ndp-nepali-box td.ndp-date {
        width: 36px; /* Slightly smaller date cells */
        height: 36px;
        padding: 0;
    }

    div#ndp-nepali-box td.ndp-current {
        width: 36px;
    }

    .ndp-primary-day, .ndp-secondary-day {
        font-size: 12px; /* Smaller text */
    }

    .ndp-header {
        padding: 8px 0;
    }

    .ndp-prev, .ndp-next {
        width: 26px;
        height: 26px;
    }

    /* Make the entire input responsive */
    .ndp-input-container {
        width: 100%;
        display: block;
    }

    /* Ensure the input takes full width */
    .ndp-nepali-calendar {
        width: 100%;
        box-sizing: border-box;
    }

    #currentMonth #ndp-month-select,
    #currentMonth #ndp-year-select {
        font-size: 12px;
        padding: 3px 20px 3px 8px;
        background-size: 10px;
        background-position: right 6px center;
    }
}

/* Custom Select2-like container styling */
.ndp-month-year-container {
    display: flex;
    justify-content: flex-end;
    gap: 5px;
    padding-right: 5px;
    padding-top: 5px;
}

/* Improve dropdown options styling */
#ndp-month-select option,
#ndp-year-select option {
    padding: 8px 10px;
    background-color: var(--select-bg);
    color: var(--select-text);
    cursor: pointer;
    line-height: 1.5;
    transition: background-color 0.2s ease;
}

#ndp-month-select option:hover,
#ndp-year-select option:hover,
#ndp-month-select option:focus,
#ndp-year-select option:focus {
    background-color: var(--select-hover-bg);
    color: var(--select-text);
}

/* Selected option styling */
#ndp-month-select option:checked,
#ndp-year-select option:checked,
#ndp-month-select option:selected,
#ndp-year-select option:selected {
    background-color: var(--highlight-color) !important;
    color: var(--text-color) !important;
    font-weight: bold;
}

/* Force highlight color in webkit browsers */
@media screen and (-webkit-min-device-pixel-ratio:0) {
    #ndp-month-select option:checked,
    #ndp-year-select option:checked {
        background-color: var(--highlight-color) !important;
        color: var(--text-color) !important;
    }
}

/* Additional styling for selected dropdown items in the custom UI */
.ndp-select-option.ndp-selected {
    background-color: var(--highlight-color) !important;
    color: var(--text-color) !important;
    font-weight: bold !important;
    position: relative;
    box-shadow: 0 0 3px rgba(0,0,0,0.1);
    border-left: 3px solid var(--highlight-border-color);
}

/* Force webkit browsers to show the custom styling */
@media screen and (-webkit-min-device-pixel-ratio:0) {
    #ndp-month-select option:checked,
    #ndp-year-select option:checked,
    #ndp-month-select option:selected,
    #ndp-year-select option:selected {
        background-color: var(--highlight-color) !important;
        color: var(--text-color) !important;
    }
}

/* Force the dropdown height with !important to override browser defaults */
select#ndp-month-select[size],
select#ndp-year-select[size] {
    height: auto !important;
    max-height: 200px !important;
    overflow-y: auto !important;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1) !important;
    border: 1px solid var(--select-border) !important;
    border-radius: 4px !important;
    position: relative !important;
    z-index: 9999 !important;
    background-color: var(--select-bg) !important;
    scrollbar-width: thin !important;
    scrollbar-color: var(--primary-color) var(--select-bg) !important;
}

/* Reset normal select styling when not expanded */
#ndp-month-select:not([size]),
#ndp-year-select:not([size]) {
    height: 32px;
    max-height: 32px;
    overflow: hidden;
    appearance: none !important;
    -webkit-appearance: none !important;
    -moz-appearance: none !important;
    background-image: url("data:image/svg+xml;charset=UTF-8,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23888' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3e%3cpolyline points='6 9 12 15 18 9'%3e%3c/polyline%3e%3c/svg%3e") !important;
    background-repeat: no-repeat !important;
    background-position: right 8px center !important;
    background-size: 12px !important;
    padding-right: 25px !important;
}

/* Webkit scrollbar styling */
select[size]::-webkit-scrollbar {
    width: 8px !important;
}

select[size]::-webkit-scrollbar-track {
    background: var(--select-bg) !important;
    border-radius: 4px !important;
}

select[size]::-webkit-scrollbar-thumb {
    background-color: var(--primary-color) !important;
    border-radius: 4px !important;
    border: 2px solid var(--select-bg) !important;
}

/* Override browser styles for options */
select#ndp-month-select[size] option,
select#ndp-year-select[size] option {
    padding: 8px 10px !important;
    min-height: 24px !important;
    display: flex !important;
    align-items: center !important;
    border-bottom: 1px solid rgba(0,0,0,0.05) !important;
}

/* Custom dropdown styling */
.ndp-custom-select {
    position: relative;
    display: inline-block;
    vertical-align: middle;
    text-align: left;
    min-width: 85px;
    margin-bottom: 0px;
    user-select: none;
}

.ndp-month-select {
    margin-right: 5px;
}

.ndp-select-trigger {
    position: relative;
    display: block;
    padding: 6px 25px 6px 10px;
    min-width: 80px;
    font-size: 13px;
    font-weight: 500;
    color: var(--select-text);
    line-height: 1.5;
    background-color: var(--select-bg);
    border: 1px solid var(--select-border);
    border-radius: 4px;
    cursor: pointer;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
    transition: all 0.2s ease-in-out;
}

.ndp-select-trigger:hover {
    border-color: var(--select-focus-border);
    background-color: var(--select-hover-bg);
}

.ndp-select-trigger:after {
    content: '';
    position: absolute;
    top: 50%;
    right: 8px;
    margin-top: -2px;
    width: 8px;
    height: 8px;
    border-top: 2px solid var(--select-arrow-color);
    border-right: 2px solid var(--select-arrow-color);
    transform: rotate(135deg);
    transition: transform 0.2s ease;
}

.ndp-custom-select.ndp-active .ndp-select-trigger:after {
    transform: rotate(-45deg);
    margin-top: 2px;
}

.ndp-custom-select.ndp-active .ndp-select-trigger {
    background-color: var(--highlight-color);
    border-color: var(--highlight-border-color);
}

.ndp-select-dropdown {
    position: absolute;
    top: 100%;
    left: 0;
    width: 100%;
    max-height: 200px;
    overflow-y: auto;
    background-color: var(--select-bg);
    border: 1px solid var(--select-border);
    border-radius: 4px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.15);
    z-index: 9999;
    margin-top: 3px;
    display: none;
    scrollbar-width: thin;
    scrollbar-color: var(--primary-color) var(--select-bg);
}

.ndp-select-option {
    padding: 8px 10px;
    font-size: 13px;
    color: var(--select-text);
    cursor: pointer;
    transition: background-color 0.2s ease;
    border-bottom: 1px solid rgba(0,0,0,0.05);
}

.ndp-select-option:last-child {
    border-bottom: none;
}

.ndp-select-option:hover {
    background-color: var(--select-hover-bg);
}

.ndp-select-option.ndp-selected {
    background-color: var(--highlight-color);
    color: var(--text-color);
    font-weight: bold;
    position: relative;
    box-shadow: 0 0 3px rgba(0,0,0,0.1);
    border-left: 3px solid var(--highlight-border-color);
}

/* Webkit scrollbar styling */
.ndp-select-dropdown::-webkit-scrollbar {
    width: 6px;
}

.ndp-select-dropdown::-webkit-scrollbar-track {
    background: var(--select-bg);
    border-radius: 4px;
}

.ndp-select-dropdown::-webkit-scrollbar-thumb {
    background-color: var(--primary-color);
    border-radius: 4px;
    border: 1px solid var(--select-bg);
}

/* Adjustments for month and year containers */
.ndp-month-year-container {
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 5px;
}