/**
 * Skripte Ekof - Global Styles
 * APPLIED EXACTLY AS PROVIDED BY USER
 */

/* 1. Grid & Buttons */
#custom-button-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    grid-template-rows: repeat(2, 32px);
    gap: 10px;
    margin: 0 20px;
    flex-grow: 1;
    width: 100%;
    max-width: 100%;
    align-self: center;
}

.grid-btn {
    background: rgba(255, 255, 255, 0.6);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    color: #1a1a4b;
    border: 1px solid rgba(0, 0, 0, 0.08);
    border-radius: 10px;
    font-family: 'Open Sans', sans-serif;
    font-size: 10.5px;
    font-weight: 600;
    letter-spacing: 0.02em;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0 12px;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    white-space: nowrap;
    position: relative;
    overflow: hidden;
}

.grid-btn i, .grid-btn svg {
    margin-right: 8px;
    width: 15px;
    height: 15px;
    stroke-width: 2.2px;
    opacity: 0.8;
}

.grid-btn:hover {
    background: #ffffff;
    color: #dc143c;
    border-color: rgba(220, 20, 60, 0.3);
    transform: translateY(-2px);
    box-shadow: 0 6px 15px rgba(0, 0, 0, 0.06);
}

/* 2. Slider (Drawer) */
#resursi-slider {
    position: fixed;
    top: 15px;
    bottom: 15px;
    right: -450px;
    width: 380px;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    z-index: 11000;
    border-radius: 24px 0 0 24px;
    box-shadow: -20px 0 50px rgba(0, 0, 0, 0.1);
    transition: right 0.5s cubic-bezier(0.19, 1, 0.22, 1);
    padding: 40px;
    box-sizing: border-box;
    display: flex;
    flex-direction: column;
    border: 1px solid rgba(255,255,255,0.3);
}

#resursi-slider.open { right: 0; }

#resursi-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(10, 10, 30, 0.15);
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
    z-index: 10500;
    transition: opacity 0.4s ease;
}

#close-resursi {
    align-self: flex-end;
    cursor: pointer;
    background: #f0f0f5;
    padding: 8px;
    border-radius: 50%;
    color: #1a1a4b;
    transition: 0.2s;
}
#close-resursi:hover { background: #e0e0eb; transform: rotate(90deg); }

.uskoro-badge {
    background: linear-gradient(135deg, #000080, #1a1a4b);
    color: white;
    padding: 6px 16px;
    border-radius: 30px;
    font-weight: 700;
    font-size: 13px;
    box-shadow: 0 4px 10px rgba(0,0,128,0.2);
}

#resursi-slider-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 24px;
    flex-shrink: 0;
}

#resursi-slider-header h2 {
    color: #1a1a4b;
    font-family: 'Alegreya Sans SC', serif;
    font-size: 22px;
    margin: 0;
    display: flex;
    align-items: center;
    gap: 10px;
}

/* 3. News Feed Styles */
#vest-filter-bar {
    display: flex;
    gap: 6px;
    flex-wrap: wrap;
    margin-bottom: 14px;
    flex-shrink: 0;
}

.filter-chip {
    font-family: 'Open Sans', sans-serif;
    font-size: 10.5px;
    font-weight: 600;
    padding: 4px 12px;
    border-radius: 20px;
    border: 1.5px solid rgba(0, 0, 0, 0.1);
    background: rgba(255, 255, 255, 0.7);
    color: #1a1a4b;
    cursor: pointer;
    transition: all 0.2s ease;
}

.filter-chip.active {
    background: #1a1a4b;
    color: #fff;
    border-color: #1a1a4b;
}

.filter-chip.active--crimson {
    background: linear-gradient(135deg, #dc143c, #8b0000);
    border-color: #dc143c;
    color: #fff;
}

.filter-divider {
    width: 1px;
    background: rgba(0, 0, 0, 0.1);
    margin: 0 2px;
}

#vest-list {
    overflow-y: auto;
    flex: 1;
    padding-right: 4px;
}

.vest-item {
    background: #f8f8fc;
    border-radius: 14px;
    padding: 16px 18px;
    margin-bottom: 12px;
    border-left: 4px solid #dc143c;
    flex-shrink: 0;
}

.vest-meta {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 8px;
}

.vest-badge {
    font-size: 10px;
    font-weight: 700;
    padding: 3px 10px;
    border-radius: 20px;
    color: white;
    letter-spacing: 0.04em;
    white-space: nowrap;
}

.vest-badge--azuriranje { background: linear-gradient(135deg, #dc143c, #8b0000); }
.vest-badge--ostala { background: linear-gradient(135deg, #1a1a4b, #000080); }

.vest-date {
    font-size: 11px;
    color: #aaa;
    font-weight: 500;
}

.vest-text {
    font-size: 13.5px;
    color: #333;
    line-height: 1.6;
    font-family: 'Open Sans', sans-serif;
}

/* 4. Beta Bar */
#skripte-beta-bar {
    position: fixed;
    top: -70px;
    left: 0;
    width: 100%;
    background: linear-gradient(135deg, #000080 0%, #1a1a4b 100%);
    color: white;
    text-align: center;
    padding: 12px 45px;
    z-index: 999999;
    font-family: 'Open Sans', sans-serif;
    font-size: 13.5px;
    font-weight: 500;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: top 0.6s cubic-bezier(0.19, 1, 0.22, 1);
    border-bottom: 3px solid #ffd700;
}

#skripte-beta-bar.show { top: 0; }

#skripte-beta-bar .beta-content {
    max-width: 1200px;
    margin: 0 auto;
    line-height: 1.4;
    display: flex;
    align-items: center;
    gap: 12px;
}

#skripte-beta-bar .beta-tag {
    background: #dc143c;
    color: white;
    padding: 2px 10px;
    border-radius: 4px;
    font-size: 11px;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    flex-shrink: 0;
}

#skripte-beta-bar a {
    color: #ffd700;
    text-decoration: none;
    font-weight: 700;
    border-bottom: 1px dashed rgba(255, 215, 0, 0.4);
    transition: all 0.2s;
}

#skripte-beta-bar a:hover {
    color: #00d4ff;
    border-color: #00d4ff;
}

#skripte-beta-bar .close-btn {
    position: absolute;
    right: 15px;
    top: 50%;
    transform: translateY(-50%);
    cursor: pointer;
    opacity: 0.5;
    transition: all 0.2s;
    padding: 8px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
}

#skripte-beta-bar .close-btn:hover {
    opacity: 1;
    background: rgba(255, 255, 255, 0.1);
}

/* Adjust Thinkific UI */
body.beta-bar-active .course-player__header,
body.beta-bar-active ._header_1rtg53 {
    top: 45px !important;
}

@media (max-width: 768px) {
    #skripte-beta-bar {
        font-size: 12px;
        padding: 10px 35px;
    }
    #skripte-beta-bar .beta-tag {
        display: none;
    }
}
