/* ==========================================================================
   GOOGLE MATERIAL DESIGN (MATERIAL 3) FOR DASHBOARD
   ========================================================================== */

/* Gumb v headerju za nastavitve se na dashboard-u ne sme prikazati */
.settings-toggle {
    display: none;
}

.container, .et_pb_row:not([class*="et_flex_column"]), .et_pb_slider .et_pb_container, .et_pb_fullwidth_section .et_pb_title_container, .et_pb_fullwidth_section .et_pb_title_featured_container, .et_pb_fullwidth_header:not(.et_pb_fullscreen) .et_pb_fullwidth_header_container {
    max-width: 1600px;
}

.g-dashboard-container {
    font-family: 'Google Sans', Roboto, Arial, sans-serif;
    color: #202124;
    max-width: 1600px;
    margin: 0 auto;
    padding: 10px;
}

/* Glava */
.g-header-card {
    background: #ffffff;
    border: 1px solid #dadce0;
    border-radius: 12px;
    padding: 24px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 24px;
    box-shadow: 0 1px 2px 0 rgba(60,64,67,0.05);
    flex-wrap: wrap;
    gap: 16px;
}

.g-header-profile {
    display: flex;
    align-items: center;
    gap: 16px;
}

.g-avatar-circle {
    width: 56px;
    height: 56px;
    border-radius: 50%;
    background-color: #653a8e;
    color: #ffffff;
    font-size: 24px;
    font-weight: 600;
    display: flex;
    align-items: center;
    justify-content: center;
    text-transform: uppercase;
}

.g-header-text h2 {
    margin: 0;
    font-size: 22px;
    font-weight: 500;
    color: #202124;
}

.g-subtext {
    margin: 4px 0 0 0;
    font-size: 14px;
    color: #5f6368;
}

.g-header-actions {
    display: flex;
    align-items: center;
    gap: 12px;
}

/* Gumbi v Google stilu */
.g-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 8px 20px;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 500;
    text-decoration: none !important;
    cursor: pointer;
    transition: all 0.2s ease;
}

.g-btn-outline {
    border: 1px solid #dadce0;
    background: #ffffff;
    color: #653a8e !important;
}

.g-btn-outline:hover {
    background: #f8f9fa;
    border-color: #d2e3fc;
}

.g-btn-google-logout {
    border: 1px solid #dadce0;
    background-color: #ffffff;
    color: #3c4043 !important;
}

.g-btn-google-logout:hover {
    background-color: #f8f9fa;
    color: #202124 !important;
    box-shadow: 0 1px 3px rgba(60,64,67,0.15);
} 

/* Button Shrani spremembe pri obrazcu za podatke o izvajalcu */
.bsd-btn-shrani {
    background-color: #653a8e;
    color: #fff; 
    padding: 12px 28px; 
    border: none; 
    border-radius: 6px; 
    font-weight: 500; 
    cursor: pointer;
    transition: background-color 0.2s ease, transform 0.1s ease, box-shadow 0.2s ease;
}

/* Hover efekt: rahla posvetlitev in lahka senca */
.bsd-btn-shrani:hover {
    background-color: #74449e; /* Nekoliko svetlejši odtenek vijolične */
    box-shadow: 0 4px 12px rgba(101, 58, 142, 0.25);
}

/* Active / Click efekt: gumb se rahlo "vdre" */
.bsd-btn-shrani:active {
    transform: scale(0.98);
    box-shadow: 0 2px 6px rgba(101, 58, 142, 0.2);
}

/* Statistika */
.g-stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 16px;
    margin-bottom: 24px;
}

.g-stat-card {
    background: #ffffff;
    border: 1px solid #dadce0;
    border-radius: 12px;
    padding: 20px;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.g-stat-label {
    font-size: 13px;
    color: #5f6368;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.g-stat-value {
    font-size: 28px;
    font-weight: 600;
    color: #653a8e;
}

/* Grid vsebin */
.g-content-grid {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 24px;
}

/* Na mobilnih napravah postavi levo in desno kartico eno pod drugo */
@media (max-width: 768px) {
    .g-content-grid {
        grid-template-columns: 1fr;
    }
    #tab-podatki .g-content-grid {
        display: grid !important;
        grid-template-columns: 1fr !important;
    }
}

.g-card {
    background: #ffffff;
    border: 1px solid #dadce0;
    border-radius: 12px;
    padding: 24px;
}

.g-card-header {
    display: flex; 
    justify-content: space-between; 
    align-items: center; 
    flex-wrap: wrap; gap: 12px;
}

.g-card-header h3 {
    margin: 0;
    font-size: 18px;
    font-weight: 500;
    color: #653a8e;
}

.g-card-header p {
    margin: 4px 0 16px 0;
    font-size: 14px;
    color: #5f6368;
}

.g-card-body {
    display: flex; 
    flex-direction: 
    column; gap: 16px;
}

.g-card-boost {
    background: #fff; 
    padding: 14px; 
    border-radius: 8px; 
    border: 1px solid #e0e0e0;
}

.g-card-boost h4 {
    margin: 0 0 6px 0; 
    font-size: 14px; 
    color: #653a8e;
}

.g-card-boost ul {
    margin: 0; 
    padding-left: 18px; 
    font-size: 13px; 
    color: #3c4043; 
    line-height: 1.6;
}

/* Tabela */
.g-table-wrapper {
    overflow-x: auto;
}

.g-material-table {
    width: 100%;
    border-collapse: collapse;
    text-align: left;
}

.g-material-table th {
    padding: 12px 16px;
    border-bottom: 2px solid #e8eaed;
    font-size: 13px;
    color: #5f6368;
    font-weight: 600;
}

.g-material-table td {
    padding: 16px;
    border-bottom: 1px solid #e8eaed;
    font-size: 14px;
}

.g-cell-title {
    font-weight: 500;
    color: #653a8e;
}

.g-cell-date {
    color: #653a8e;
}


/* Prilagoditev tabele za mobilne naprave (zasloni ožji od 768px) */

/* TO JE ZA TABELO PODAKI O IZVAJALCU */

@media (max-width: 768px) {
   
   /* Dodamo razmik od gumba "Dodaj novo pesem" do kartice pod njim */
   .g-btn-outline {
        margin-bottom: 14px;
    }
   
    /* Skrijemo glavo tabele (thead), saj jo na telefonu nadomestijo oznake */
    .g-material-table thead {
        display: none;
    }

    /* Tabela in njeni elementi naj se obnašajo kot blok elementi */
    .g-material-table, 
    .g-material-table tbody, 
    .g-material-table tr, 
    .g-material-table td {
        display: block;
        width: 100%;
    }

    /* Vsaka vrstica (pesem) postane samostojna vizualna kartica */
    .g-material-table tr {
        background: #ffffff;
        border: 1px solid #dadce0;
        border-radius: 8px;
        margin-bottom: 16px;
        padding: 16px;
        box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
        box-sizing: border-box;
    }

    /* Posamezne celice znotraj kartice */
    .g-material-table td {
        border: none !important;
        padding: 6px 0 !important;
        text-align: left !important;
    }

    /* 1. Naslov pesmi: čez celo širino, večji poudarek */
    .g-material-table td.g-cell-title {
        font-size: 16px;
        font-weight: 600;
        margin-bottom: 0px;
        padding-bottom: 10px !important;
        border-bottom: 0px solid #f1f3f4 !important;
    }

    /* 2. Ogledu in statusu dodamo lične prednapise (label) preko CSS-ja, da so razumljivi */
    .g-material-table td:nth-child(2):before {
        content: "Ogledi: ";
        font-weight: 600;
        color: #5f6368;
    }

    .g-material-table td:nth-child(3):before {
        content: "Status: ";
        font-weight: 600;
        color: #5f6368;
    }

    /* 3. Akcija (gumb Uredi): premaknemo na dno kartice z ločilno črto */
    .g-material-table td:last-child {
        margin-top: 0px;
        padding-top: 12px !important;
        border-top: 1px solid #f1f3f4 !important;
        text-align: right !important; /* Gumb obdržimo desno ali ga raztegnemo na celo širino */
    }
    
    /* Opcionalno: da je gumb Uredi na telefonu lepši in širši */
    .g-material-table td:last-child .g-btn {
        display: inline-block;
        width: 100%;
        text-align: center;
        box-sizing: border-box;
        padding: 10px;
    }
}

/* TO JE ZA TAB Pesmi / Besedila */
/* Mobilna prilagoditev za tabelo pesmi */
@media (max-width: 768px) {

/* Popravek za btn "Skrij / Objavi", da se na telefonu prikaže pod "Uredi" */
 .bsd-toggle-status {
        display: block !important;
        margin-left: 0 !important;
        margin-top: 6px !important;
    }
    
/* Pri ogledu in statusu dodamo lične prednapise (label) preko CSS-ja, da so razumljivi */
    .g-material-boost td:nth-child(2):before {
        content: "Trajanje: " !important;
        font-weight: 600;
        color: #5f6368;
    }
    .g-material-boost td:nth-child(3):before {
        content: "Paket: " !important;
        font-weight: 600;
        color: #5f6368;
    }
    .g-material-boost td:nth-child(4):before {
        content: "Status: " !important;
        font-weight: 600;
        color: #5f6368;
    }

}

/* TO JE ZA TABELO STATISTIKA */
/* Mobilna prilagoditev za tabelo statistike */
@media (max-width: 768px) {
    /* Skrijemo naslov pred imenom pesmi */
    .g-stat-table .g-cell-title::before {
        content: none !important;
        display: none !important;
    }
    /* Skrijemo zaporedno številko na telefonu */
    .g-stat-table .g-stat-col-num {
        display: none !important;
    }
    
    /* Skrijemo glavo tabele */
    .g-stat-table thead {
        display: none !important;
    }

    /* Elementi naj bodo blok */
    .g-stat-table, 
    .g-stat-table tbody, 
    .g-stat-table tr.g-stat-row, 
    .g-stat-table td {
        display: block !important;
        width: 100% !important;
        box-sizing: border-box !important;
    }

    /* Kartica posamezne pesmi */
    .g-stat-table tr.g-stat-row {
        background: #ffffff !important;
        border: 1px solid #dadce0 !important;
        border-radius: 8px !important;
        margin-bottom: 16px !important;
        padding: 16px !important;
        box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04) !important;
    }

    .g-stat-table td {
        border: none !important;
        padding: 0 !important;
        text-align: left !important;
    }

    /* 1. Zaporedna številka */
    .g-stat-table .g-stat-col-num {
        font-size: 13px !important;
        font-weight: 700 !important;
        color: #653a8e !important;
        margin-bottom: 4px !important;
    }

    /* 2. Naslov pesmi - čez celo širino, z ločnico spodaj */
    .g-stat-table .g-cell-title {
        font-size: 15px !important;
        font-weight: 600 !important;
        margin-bottom: 0px !important;
        padding-bottom: 8px !important;
        border-bottom: 0px solid #f1f3f4 !important;
    }


    /* 3. Število ogledov - z izrecnim besedilom zgoraj */
    .g-stat-table .g-stat-col-views {
        font-size: 14px !important;
        color: #5f6368 !important;
        text-align: left !important;
    }

    .g-stat-table .g-stat-col-views::before {
        content: "Število ogledov: " !important;
        font-weight: 600 !important;
        color: #5f6368 !important;
    }
}

/* Google Status Kapsule (Badges) */
.g-badge {
    display: inline-flex;
    align-items: center;
    padding: 4px 12px;
    border-radius: 16px;
    font-size: 13px;
    font-weight: 500;
}

.g-badge-active {
    background-color: #e6f4ea;
    color: #653a8e;
}

.g-badge-pending {
    background-color: #fef7e0;
    color: #b06000;
}

.g-badge-expired {
    background-color: #f1f3f4;
    color: #5f6368;
}

/* Desna kartica - podatki */
.g-info-group {
    margin-bottom: 16px;
}

.g-info-group label {
    display: block;
    font-size: 12px;
    color: #5f6368;
    margin-bottom: 4px;
    text-transform: uppercase;
}

.g-info-group div {
    font-size: 15px;
    font-weight: 500;
    color: #202124;
}

.g-empty-state {
    padding: 24px;
    text-align: center;
    color: #5f6368;
    background: #f8f9fa;
    border-radius: 8px;
}

.g-empty-state.error {
    color: #d93025;
    background: #fce8e6;
}

/* ==========================================================================
   GOOGLE MATERIAL TABS
   ========================================================================== */
.g-tabs-nav {
    display: flex;
    gap: 8px;
    border-bottom: 2px solid #dadce0;
    margin-bottom: 24px;
}

.g-tab-btn {
    background: none;
    border: none;
    border-bottom: 3px solid transparent;
    padding: 12px 20px;
    font-family: 'Google Sans', Roboto, Arial, sans-serif;
    font-size: 15px;
    font-weight: 500;
    color: #653a8e;
    cursor: pointer;
    transition: all 0.2s ease;
    margin-bottom: -2px;
}

.g-tab-btn:hover {
    color: #653a8e;
    background-color: #f8f9fa;
    border-radius: 6px 6px 0 0;
}

.g-tab-btn.active {
    color: #653a8e;
    border-bottom: 3px solid #653a8e;
}

.g-tab-content {
    display: none;
}

.g-tab-content.active {
    display: block;
}

.g-btn-sm {
    padding: 4px 12px !important;
    font-size: 13px !important;
}

.g-link {
    color: #653a8e;
    text-decoration: none;
    font-weight: 500;
}

.g-link:hover {
    text-decoration: underline;
}

/* Sprememba barve za vsa potrditvena polja v nadzorni plošči */
.g-tab-content input[type="checkbox"] {
    accent-color: #653a8e !important;
    width: 20px;  /* Opcijsko: malo večji kvadratki za boljšo preglednost */
    height: 20px;
    cursor: pointer;
}

/* Container za avatar */
.bsd-avatar-wrapper {
    width: 64px;
    height: 64px;
    border-radius: 50%;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: #f1f3f4;
    border: 1px solid #653a8e; /* Rob v primarni barvi */
    flex-shrink: 0;
}

/* 1. Če je prikazana slika */
.bsd-avatar-img {
    width: 100%;
    height: 100%;
    object-fit: cover; /* Prepreči raztegovanje slike */
}

/* 2. Če je prikazana začetnica */
.bsd-avatar-initial {
    width: 100%;
    height: 100%;
    background-color: #653a8e; /* Primarna barva za ozadje */
    color: #ffffff;
    font-size: 26px;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
    text-transform: uppercase;
}



/* ==========================================================================
   ODZIVNOST ZAVIHKOV NA MOBILNIH NAPRAVAH (HORIZONTALNO DRSENJE)
   ========================================================================== */
.g-tabs-nav {
    display: flex;
    gap: 8px;
    border-bottom: 2px solid #dadce0;
    margin-bottom: 24px;
    
    /* Omogoči vodoravno drsenje na telefonih */
    overflow-x: auto;
    white-space: nowrap;
    -webkit-overflow-scrolling: touch; /* Gladko drsenje na iOS / Safari */
    scrollbar-width: none; /* Skrije drsnik v Firefoxu */
}

/* Skrije vizualni drsnik v Chrome, Safari in Edge za lepši videz */
.g-tabs-nav::-webkit-scrollbar {
    display: none;
}

/* Prepreči, da bi se gumbi skrčili ali prelomili na malih zaslonih */
.g-tab-btn {
    flex-shrink: 0;
    padding: 10px 16px;
    font-size: 14px;
}

/* Označimo, da je vrstico mogoče premikati z vlečenjem */
.g-tabs-nav {
    cursor: grab;
    user-select: none; /* Prepreči označevanje besedila med vlečenjem */
}

.g-tabs-nav:active {
    cursor: grabbing;
}