/* =====================================================
   Sidebar Stylesheet (sidebar.css) - Premium Redesign
   ===================================================== */

.sidebar-wrapper {
    display: flex;
    flex-direction: column;
    gap: 20px;
    position: sticky;
    top: 75px;
    align-self: start;
}

/* Base Widget Card */
.sidebar-widget {
    background: #ffffff;
    border: 1px solid rgba(0, 0, 0, 0.08);
    border-radius: 12px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.03);
    overflow: hidden;
    transition: transform 0.2s, box-shadow 0.2s;
}

.sidebar-widget:hover {
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.06);
}

/* Widget Header */
.widget-header {
    background: linear-gradient(135deg, #f8fafc 0%, #f1f5f9 100%);
    border-bottom: 1px solid rgba(0, 0, 0, 0.08);
    padding: 12px 18px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.widget-icon {
    font-size: 1.2rem;
    line-height: 1;
}

.widget-title {
    margin: 0;
    font-size: 0.95rem;
    font-weight: 700;
    color: #1e293b;
    font-family: Arial, Helvetica, sans-serif;
    letter-spacing: 0.2px;
}

.widget-header a {
    text-decoration: none;
    color: #1e293b;
}

.widget-header a:hover {
    color: #2563eb;
}

.widget-body {
    padding: 16px;
}

/* Widget 1: Ticket Checker Custom Forms */
.form-label-custom {
    display: block;
    font-size: 0.85rem;
    font-weight: 600;
    color: #475569;
    margin-bottom: 6px;
}

.input-group-custom {
    position: relative;
    display: flex;
    align-items: center;
}

.input-icon {
    position: absolute;
    left: 12px;
    font-size: 1rem;
    pointer-events: none;
    z-index: 10;
}

.form-control-custom,
.form-select-custom {
    width: 100%;
    padding: 9px 12px 9px 36px;
    font-size: 0.9rem;
    font-weight: 500;
    color: #334155;
    background-color: #ffffff;
    border: 1px solid #cbd5e1;
    border-radius: 8px;
    outline: none;
    transition: border-color 0.2s, box-shadow 0.2s;
    font-family: Arial, Helvetica, sans-serif;
}

.form-control-custom:focus,
.form-select-custom:focus {
    border-color: #3b82f6;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.12);
}

.textarea-custom {
    height: 90px;
    resize: none;
    padding-left: 12px;
}

.form-note {
    font-size: 0.75rem;
    color: #64748b;
    margin-top: 4px;
}

.btn-submit-custom {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 8px;
    width: 100%;
    padding: 11px;
    background: linear-gradient(135deg, #ef4444 0%, #dc2626 100%);
    color: #ffffff;
    font-size: 0.9rem;
    font-weight: 700;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    box-shadow: 0 4px 10px rgba(220, 38, 38, 0.15);
    transition: transform 0.15s, box-shadow 0.15s, background 0.15s;
    font-family: Arial, Helvetica, sans-serif;
}

.btn-submit-custom:hover {
    transform: translateY(-1px);
    box-shadow: 0 5px 12px rgba(220, 38, 38, 0.25);
    background: linear-gradient(135deg, #f87171 0%, #dc2626 100%);
}

.btn-submit-custom:active {
    transform: translateY(0);
}

/* Ticket Checker AJAX Results Page */
.results-header {
    border-bottom: 1px solid #e2e8f0;
    padding-bottom: 10px;
    margin-bottom: 12px;
}

.results-header h4 {
    font-size: 1rem;
    font-weight: 700;
    color: #0f172a;
    margin: 0;
}

.results-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
    max-height: 250px;
    overflow-y: auto;
    padding-right: 4px;
}

.result-card {
    border-radius: 8px;
    padding: 10px 12px;
    border: 1px solid #e2e8f0;
    position: relative;
}

.result-card.no-win {
    background-color: #f8fafc;
    border-left: 4px solid #94a3b8;
}

.result-card.win {
    background-color: #f0fdf4;
    border: 1px solid #bbf7d0;
    border-left: 4px solid #22c55e;
}

.result-card.error {
    background-color: #fef2f2;
    border-left: 4px solid #ef4444;
}

.win-badge {
    position: absolute;
    top: 6px;
    right: 8px;
    font-size: 0.65rem;
    font-weight: 800;
    background-color: #22c55e;
    color: #ffffff;
    padding: 2px 6px;
    border-radius: 4px;
    letter-spacing: 0.5px;
}

.ticket-num {
    font-size: 1.15rem;
    font-weight: 800;
    color: #0f172a;
    letter-spacing: 1px;
}

.win-details {
    margin-top: 4px;
    font-size: 0.8rem;
    color: #1e293b;
    line-height: 1.4;
}

.result-msg {
    margin-top: 4px;
    font-size: 0.8rem;
    font-weight: 600;
}

.btn-back-checker {
    width: 100%;
    padding: 8px;
    background-color: #f1f5f9;
    color: #475569;
    border: 1px solid #cbd5e1;
    border-radius: 6px;
    font-size: 0.85rem;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.15s, color 0.15s;
}

.btn-back-checker:hover {
    background-color: #e2e8f0;
    color: #1e293b;
}

/* Widget 2: Today's Schedule Timeline */
.timeline-schedule {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.timeline-item {
    display: flex;
    align-items: flex-start;
    gap: 12px;
}

.timeline-badge {
    flex: 0 0 52px;
    background-color: #dbeafe;
    color: #1e3a8a;
    font-size: 0.75rem;
    font-weight: 800;
    text-align: center;
    padding: 4px 0;
    border-radius: 6px;
    letter-spacing: 0.2px;
    border: 1px solid #bfdbfe;
}

.timeline-content {
    flex: 1;
}

.timeline-cities {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.city-link {
    display: inline-block;
    font-size: 0.82rem;
    font-weight: 600;
    color: #2563eb;
    text-decoration: none;
    background-color: #f8fafc;
    border: 1px solid #e2e8f0;
    padding: 3px 8px;
    border-radius: 4px;
    transition: all 0.15s;
}

.city-link:hover {
    background-color: #eff6ff;
    border-color: #bfdbfe;
    color: #1d4ed8;
}

/* Widget 3: Regional Grid List */
.region-section {
    border-bottom: 1px solid #f1f5f9;
    padding-bottom: 14px;
    margin-bottom: 14px;
}

.region-section:last-child {
    border-bottom: none;
    padding-bottom: 0;
    margin-bottom: 0;
}

.region-title-bar {
    margin-bottom: 8px;
}

.region-title-bar a {
    font-size: 0.88rem;
    font-weight: 700;
    color: #1e293b;
    text-decoration: none;
    display: flex;
    align-items: center;
    transition: color 0.15s;
}

.region-title-bar a::before {
    content: "●";
    color: #ef4444;
    font-size: 0.7rem;
    margin-right: 6px;
}

.region-title-bar a:hover {
    color: #2563eb;
}

.region-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 6px;
}

.region-grid a {
    display: block;
    text-align: center;
    background-color: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 6px;
    padding: 5px;
    font-size: 0.8rem;
    font-weight: 600;
    color: #475569;
    text-decoration: none;
    transition: all 0.2s;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.region-grid a:hover {
    background-color: #eff6ff;
    border-color: #93c5fd;
    color: #2563eb;
    transform: translateY(-1px);
    box-shadow: 0 2px 5px rgba(37, 99, 235, 0.05);
}

/* Widget 4: 100 Numbers Zodiac Card Grid */
.zodiac-list {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 8px;
}

.zodiac-item {
    display: flex;
    align-items: center;
    gap: 8px;
    background-color: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    padding: 6px 8px;
    transition: all 0.2s;
}

.zodiac-item:hover {
    background-color: #fffbeb;
    border-color: #fde68a;
    transform: scale(1.02);
}

.zodiac-avatar-box {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background-color: #ffffff;
    border: 1px solid #e2e8f0;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.03);
    flex-shrink: 0;
}

.zodiac-icon {
    font-size: 1.1rem;
    line-height: 1;
}

.zodiac-info {
    flex: 1;
    min-width: 0;
}

.zodiac-name {
    font-size: 0.78rem;
    font-weight: 700;
    color: #334155;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.zodiac-numbers {
    display: flex;
    flex-wrap: wrap;
    gap: 2px;
    margin-top: 1px;
}

.zodiac-numbers span {
    font-size: 0.65rem;
    font-weight: 800;
    background-color: #e2e8f0;
    color: #475569;
    padding: 1px 3px;
    border-radius: 4px;
    line-height: 1;
}

.btn-zodiac-toggle {
    background: transparent;
    border: 1px solid #ef4444;
    color: #ef4444;
    font-size: 0.8rem;
    font-weight: 700;
    padding: 6px 16px;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.2s;
}

.btn-zodiac-toggle:hover {
    background-color: #ef4444;
    color: #ffffff;
    box-shadow: 0 3px 8px rgba(239, 68, 68, 0.15);
}

/* =====================================================
   Quick Links Widgets (Quay thử, Chốt số, Sổ kết quả)
   ===================================================== */
.sidebar-svg-icon {
    display: block;
    stroke-width: 2.2px;
}

/* Widget accent color styles */
.widget-schedule .widget-icon {
    color: #3b82f6;
}

.widget-quay-thu .widget-icon {
    color: #f59e0b;
}

.widget-chot-so .widget-icon {
    color: #ef4444;
}

.widget-so-ket-qua .widget-icon {
    color: #10b981;
}

/* Grid Layout */
.quick-links-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 8px;
}

/* Quick Link Item Layout */
.quick-link-item {
    display: flex;
    align-items: center;
    padding: 10px 12px;
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    text-decoration: none;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    cursor: pointer;
}

/* Round Dot Indicators instead of Emojis */
.dot-indicator {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    margin-right: 8px;
    flex-shrink: 0;
    display: inline-block;
}

.dot-3mien {
    background-color: #8b5cf6; /* Purple */
    box-shadow: 0 0 6px rgba(139, 92, 246, 0.4);
}

.dot-mb {
    background-color: #ef4444; /* Red */
    box-shadow: 0 0 6px rgba(239, 68, 68, 0.4);
}

.dot-mt {
    background-color: #3b82f6; /* Blue */
    box-shadow: 0 0 6px rgba(59, 130, 246, 0.4);
}

.dot-mn {
    background-color: #10b981; /* Green */
    box-shadow: 0 0 6px rgba(16, 185, 129, 0.4);
}

/* Link Label text */
.quick-link-item .link-label {
    font-size: 0.8rem;
    font-weight: 700;
    color: #475569;
    flex-grow: 1;
    line-height: 1.2;
    transition: color 0.15s ease;
}

/* Chevron arrow indicators */
.chevron-arrow {
    display: inline-flex;
    align-items: center;
    color: #94a3b8;
    margin-left: 4px;
    transition: transform 0.2s ease, color 0.2s ease;
}

.chevron-arrow svg {
    display: block;
}

/* General Hover Item styles */
.quick-link-item:hover {
    background: #ffffff;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.04);
    transform: translateY(-1px);
    text-decoration: none; /* Prevent underline style */
}

.quick-link-item:hover .chevron-arrow {
    color: #475569;
    transform: translateX(3px);
}

/* Regional Hover states */
.quick-link-item.item-3mien:hover {
    border-color: #c084fc;
    background: #f5f3ff;
}
.quick-link-item.item-3mien:hover .link-label {
    color: #7c3aed;
}

.quick-link-item.item-mb:hover {
    border-color: #fca5a5;
    background: #fef2f2;
}
.quick-link-item.item-mb:hover .link-label {
    color: #dc2626;
}

.quick-link-item.item-mt:hover {
    border-color: #93c5fd;
    background: #eff6ff;
}
.quick-link-item.item-mt:hover .link-label {
    color: #2563eb;
}

.quick-link-item.item-mn:hover {
    border-color: #6ee7b7;
    background: #ecfdf5;
}
.quick-link-item.item-mn:hover .link-label {
    color: #059669;
}

/* Responsive Grid adjustment */
@media (max-width: 480px) {
    .quick-links-grid {
        grid-template-columns: 1fr;
    }
}
