:root {
    --he-widget-radius: 8px;
    --he-widget-shadow: 0 4px 12px rgba(0,0,0,0.08);
    --he-header-bg: linear-gradient(135deg, #0ca1e9, #0e7fdd);
    --he-today-bg: #d54e21;
    --he-event-border: #d54e21; 
}

#hason-calendar-widget-wrapper {
    /* Đây là wrapper chung */
}
.hason-event-card {
    background: #ffffff;
    border-radius: var(--he-widget-radius);
    box-shadow: var(--he-widget-shadow);
    overflow: hidden;
}
#calendar-card {
    margin-bottom: 20px; 
}

.widget-header {
    background: var(--he-header-bg);
    padding: 12px 15px;
}
.widget-header h3 {
    color: #fff;
    font-size: 16px;
    font-weight: 600;
    margin: 0;
    display: flex;
    align-items: center;
}
.widget-header h3 .dashicons {
    font-size: 20px;
    margin-right: 8px;
    line-height: 1;
}

.widget-content {
    background-image: linear-gradient(#ffffffc9, #ffffffc9), url(https://hasontech.com/1022/wp-content/uploads/2025/08/NT-4.jpg);
    background-size: cover;
    background-repeat: no-repeat;
}
#calendar-card .widget-content {
    padding: 10px;
}
.calendar-nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 5px;
    background: #fff;
    border-radius: var(--he-widget-radius);
}
.calendar-nav-button {
    background: transparent;
    border-radius: 50%;
    color: #555;
    cursor: pointer;
    font-size: 15px;
    font-weight: bold;
    line-height: 1;
    width: 30px;
    height: 30px;
    transition: all 0.2s;
    margin: 0;
}
.calendar-nav-button:hover {
    background: #f0f0f0;
    color: #000;
}
.calendar-nav-display {
    display: flex;
    gap: 8px;
}
.calendar-nav-select {
    border: none;
    font-size: 14px;
    font-weight: 600;
    color: #333;
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;
    background: transparent;
    padding: 5px;
    cursor: pointer;
    margin: 0;
}

table.hason-calendar {
    width: 100%;
    border-collapse: collapse;
    table-layout: fixed;
    margin-bottom: 0;
	border: 0px solid #cccccc00;
}
table.hason-calendar th {
    padding: 10px 0;
    font-size: 0.8em !important;
    font-weight: 600;
    color: #555;
    text-align: center;
    text-transform: inherit;
}
table.hason-calendar td {
    text-align: center;
    padding: 0;
    height: 45px;
    font-size: 14px;
    vertical-align: middle;
    position: relative;
    border-bottom: 0;
	border: 0px solid #ffffff00;
}
table.hason-calendar td.calendar-day {
    transition: background 0.2s;
}
table.hason-calendar td.calendar-day {
    cursor: pointer;
    font-weight: 600;
    color: #424242;
}
table.hason-calendar td.calendar-day span {
    position: relative;
    z-index: 2;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 30px;
    height: 30px;
    border-radius: 50%;
    font-size: 0.8em;
}

table.hason-calendar td.today span {
    background: var(--he-today-bg);
    color: #fff;
    font-weight: 700;
}

table.hason-calendar td.has-upcoming-event span {
    border: 2px solid var(--he-event-border);
    padding: 16px;
}
table.hason-calendar td.today.has-upcoming-event span {
    border: 2px solid var(--he-today-bg);
    background: var(--he-today-bg);
}

#event-list-card .widget-content {
    padding: 15px;
    height: auto; 
    overflow: hidden;
    position: relative;
	max-height: 250px;
}
.marquee-wrapper {
    /* JS sẽ điều khiển animation ở đây */
}
ul.latest-events-marquee {
    list-style: none;
    margin: 0;
    padding: 0;
}
ul.latest-events-marquee:hover {
    animation-play-state: paused;
}
ul.latest-events-marquee li {
    display: flex;
    align-items: baseline;
    padding: 2px 0;
}

ul.latest-events-marquee li a {
    text-decoration: none;
    color: #333;
    font-weight: 500;
    font-size: 14px;
    line-height: 1.4; 
    flex-grow: 1;   
}
ul.latest-events-marquee li a:hover {
    color: var(--he-header-bg);
}
ul.latest-events-marquee li::before {
    content: '▶';
    font-size: 0.7em;
    color: var(--he-header-bg);
    margin-right: 8px;
    flex-shrink: 0; 
}

@keyframes marquee-scroll {
    0%   { transform: translateY(0); }
    100% { transform: translateY(-100%); }
}

#calendar-wrapper.calendar-is-loading {
    opacity: 0.5; 
    transition: opacity 0.15s ease-in-out;
    pointer-events: none;
}

#hason-calendar-widget-wrapper .calendar-nav-display {
    display: flex; 
    gap: 8px; 
    flex-grow: 1; 
    justify-content: center; 
}

#hason-calendar-widget-wrapper .calendar-nav-select {
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;
    background-color: #ffffff; 
    border: 1px solid #cccccc; 
    border-radius: 4px; 
    padding: 6px 30px 6px 12px; 
    font-size: 14px;
    font-weight: 600;
    color: #333;
    line-height: 1.5;
    background-image: url('data:image/svg+xml;utf8,<svg fill="%23444" height="24" viewBox="0 0 24 24" width="24" xmlns="http://www.w3.org/2000/svg"><path d="M7 10l5 5 5-5z"/><path d="M0 0h24v24H0z" fill="none"/></svg>');
    background-repeat: no-repeat;
    background-position: right 6px center; 
    background-size: 20px 20px; 
    cursor: pointer;
    outline: none; 
}
#hason-calendar-widget-wrapper .calendar-nav-select:hover,
#hason-calendar-widget-wrapper .calendar-nav-select:focus {
    border-color: #999;
}

.widget-header.has-search-popup {
    display: flex;
    justify-content: space-between; 
    align-items: center;
    position: relative; 
}

.hason-event-search-button {
    background: #ffffff;
    border: 1px solid #ccc;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 10px;
    margin: 0;
}
.hason-event-search-button:hover {
    background: #e0e0e0;
}
.hason-event-search-button .dashicons {
    font-size: 18px;
    width: 18px;
    height: 18px;
    line-height: 1;
}

.event-search-popup {
    display: none; 
    position: absolute;
    top: calc(100% + 5px); 
    right: 0;
    width: 280px; 
    max-width: 90vw;
    background: #fff;
    border: 1px solid #ccc;
    border-radius: 4px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
    z-index: 1000;
    padding: 12px;
}

.event-search-popup .searchform {
    display: flex;
    width: 100%;
    margin-bottom: 0;
}

.event-search-popup .search-field {
    flex-grow: 1; 
    min-width: 0;
    border: 1px solid #ccc;
    border-radius: 3px 0 0 3px;
    padding: 8px;
    margin: 0;
    outline: none;
}
.event-search-popup .search-field:focus {
    border-color: #007cba;
}

.event-search-popup .search-submit {
    background: #007cba;
    color: white;
    border: 1px solid #007cba;
    border-radius: 0 3px 3px 0;
    margin: 0 0 0 -1px; 
    padding: 0 10px;
    cursor: pointer;
}
.event-search-popup .search-submit .dashicons {
    line-height: 1.8; 
}