/* --- VEZE (CONNECTIONS) LISTA --- */

.mda-connections-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.mda-conn-item {
    background-color: #24252b;
    /* Ista boja kao transakcije */
    border-radius: 8px;
    overflow: hidden;
    transition: background-color 0.2s ease;
}

.mda-conn-item:hover {
    background-color: #2a2b33;
}

/* HEADER RED (Uvijek vidljiv) */
.mda-conn-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 15px 20px;
    cursor: pointer;
    user-select: none;
}

/* LOGO LIJEVO */
.mda-conn-logo {
    width: 200px;
    /* Rezerviran prostor kao za datum u transakcijama */
    display: flex;
    align-items: center;
}

.mda-conn-logo img {
    height: 20px !important;
    width: auto;
    max-width: 100% !important;
    filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.5));
}

/* STATUS SREDINA */
.mda-conn-status {
    flex-grow: 1;
    display: flex;
    align-items: center;
    gap: 12px;
}

.mda-conn-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
}

.mda-conn-dot-success {
    background-color: #23a559;
    box-shadow: 0 0 5px rgba(35, 165, 89, 0.5);
}

.mda-conn-dot-failed {
    background-color: #f04747;
    box-shadow: 0 0 5px rgba(240, 71, 71, 0.5);
}

.mda-conn-status-text {
    font-weight: 700;
    font-size: 13px;
    color: #fff;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* AKCIJA DESNO */
.mda-conn-action {
    display: flex;
    align-items: center;
    gap: 8px;
    color: #b0b0d0;
}

.mda-conn-details-text {
    font-size: 13px;
    font-weight: 600;
}

.mda-conn-chevron {
    transition: transform 0.3s ease;
}

/* DROPDOWN DETALJI (Skriveno) */
.mda-conn-dropdown {
    max-height: 0;
    opacity: 0;
    overflow: hidden;
    transition: all 0.3s ease-in-out;
    background-color: #24252b;
    /* Malo tamnija pozadina za detalje */
    border-top: 1px solid rgba(255, 255, 255, 0.05);
}

/* KADA JE AKTIVNO (Otvoreno) */
.mda-conn-item.active .mda-conn-dropdown {
    max-height: 200px;
    opacity: 1;
    padding: 20px;
}

.mda-conn-item.active .mda-conn-chevron {
    transform: rotate(180deg);
}

/* Unutrašnjost kada je spojeno */
.mda-conn-info-wrapper {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.mda-conn-user-info {
    display: flex;
    align-items: center;
    gap: 15px;
}

.mda-conn-avatar {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    object-fit: cover;
}

.mda-conn-avatar-placeholder {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background: #333;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
}

.mda-conn-username {
    font-weight: 700;
    font-size: 16px;
    color: #fff;
    margin-bottom: 4px;
}

.mda-conn-date {
    font-size: 12px;
    color: #b0b0d0;
}

/* Kontrole (Toggle i Gumb) */
.mda-conn-controls {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 10px;
}

.mda-conn-toggle-wrap {
    display: flex;
    align-items: center;
    gap: 10px;
}

.mda-toggle-label {
    font-size: 13px;
    color: #b0b0d0;
    font-weight: 600;
}

.mda-btn-disconnect {
    background: transparent;
    border: 1px solid rgba(240, 71, 71, 0.5);
    color: #f04747;
    padding: 6px 12px;
    border-radius: 4px;
    font-size: 12px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.2s;
}

.mda-btn-disconnect:hover {
    background: rgba(240, 71, 71, 0.1);
}

/* Unutrašnjost kada NIJE spojeno */
.mda-conn-connect-wrapper {
    text-align: center;
    padding: 10px 0;
}

.mda-conn-connect-wrapper p {
    color: #b0b0d0;
    font-size: 14px;
    margin-bottom: 15px;
}

/* --- TOGGLE SWITCH CSS --- */
.mda-switch {
    position: relative;
    display: inline-block;
    width: 40px;
    height: 20px;
}

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

.mda-slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: #4f545c;
    transition: .4s;
}

.mda-slider:before {
    position: absolute;
    content: "";
    height: 14px;
    width: 14px;
    left: 3px;
    bottom: 3px;
    background-color: white;
    transition: .4s;
}

.mda-switch input:checked+.mda-slider {
    background-color: #23a559;
}

.mda-switch input:checked+.mda-slider:before {
    transform: translateX(20px);
}

.mda-slider.round {
    border-radius: 20px;
}

.mda-slider.round:before {
    border-radius: 50%;
}

/* ==========================================================
   STEAM PROFILE WIDGET (SHORTCODE)
========================================================== */
.mda-steam-widget {
    background: #1a1a20;
    border-radius: 15px;
    padding: 15px;
    border: 1px solid rgba(255, 255, 255, 0.05);
    font-family: 'Righteous', sans-serif;
}

.mda-steam-header {
    display: flex;
    align-items: center;
    text-decoration: none !important;
    gap: 15px;
}

.mda-steam-avatar-wrapper {
    position: relative;
    flex-shrink: 0;
}

.mda-steam-avatar {
    width: 48px;
    height: 48px;
    border-radius: 6px;
    object-fit: cover;
    border: 2px solid #575757;
    /* Default offline siva */
}

.mda-steam-info {
    flex-grow: 1;
    overflow: hidden;
}

.mda-steam-name {
    color: #fff;
    font-size: 15px;
    font-weight: 700;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    margin-bottom: 2px;
}

.mda-steam-status-text {
    font-size: 13px;
    color: #898989;
    font-weight: 600;
    text-transform: uppercase;
}

/* KONTEJNER CIJELOG WIDGETA */
.mda-profile-connection-widget {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-bottom: 20px;
}

/* LOGO IZNAD WIDGETA */
.mda-widget-top-logo {
    display: flex;
    justify-content: center;
    align-items: center;
    width: 100%;
}

.mda-widget-top-logo img {
    height: 25px !important;
    /* Ista veličina kao na panelu za spajanje */
    width: auto !important;
    filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.4));
}

/* BOJE STATUSA */
.mda-steam-online .mda-steam-avatar {
    border-color: #57cbde;
}

.mda-steam-online .mda-steam-status-text {
    color: #57cbde;
}

.mda-steam-ingame {
    border-color: rgb(113, 95, 169);
    background: rgba(113, 95, 169, 0.24);
}

.mda-steam-ingame .mda-steam-avatar {
    border-color: #90ba3c;
}

.mda-steam-ingame .mda-steam-status-text {
    color: #90ba3c;
}

.mda-steam-busy .mda-steam-avatar {
    border-color: #f04747;
}

.mda-steam-busy .mda-steam-status-text {
    color: #f04747;
}

/* KUTIJA ZA TRENUTNU IGRU */
.mda-steam-game-box {
    margin-top: 15px;
    background: #111115;
    border-radius: 10px;
    display: flex;
    align-items: center;
    padding: 8px;
    gap: 12px;
}

.mda-steam-game-img {
    width: 80px;
    height: auto;
    border-radius: 4px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.5);
}

.mda-steam-game-name {
    color: #fff;
    font-size: 13px;
    font-weight: 700;
    line-height: 1.3;
}

/* ==========================================================
   TWITCH PROFILE WIDGET (SHORTCODE)
========================================================== */
.mda-twitch-widget {
    background: #1a1a20;
    border-radius: 12px;
    padding: 15px;
    border: 1px solid rgba(255, 255, 255, 0.05);
    font-family: 'Righteous', sans-serif;
    transition: transform 0.2s ease, border-color 0.2s ease;
}

.mda-twitch-widget:hover {
    transform: translateY(-2px);
}

.mda-twitch-header {
    display: flex;
    align-items: center;
    text-decoration: none !important;
    gap: 15px;
}

.mda-twitch-avatar-wrapper {
    position: relative;
    flex-shrink: 0;
}

.mda-twitch-avatar {
    width: 48px;
    height: 48px;
    border-radius: 6px;
    object-fit: cover;
    border: 2px solid #575757;
    /* Default offline */
    transition: border-color 0.3s ease;
}

/* LIVE BADGE MALI ISPOD SLIKE */
.mda-twitch-live-badge {
    position: absolute;
    bottom: -8px;
    left: 50%;
    transform: translateX(-50%);
    background: #e91916;
    /* Twitch crvena */
    color: #fff;
    font-size: 10px;
    font-weight: 800;
    padding: 2px 6px;
    border-radius: 4px;
    letter-spacing: 0.5px;
    box-shadow: 0 2px 4px rgba(233, 25, 22, 0.4);
    z-index: 2;
}

.mda-twitch-info {
    flex-grow: 1;
    overflow: hidden;
}

.mda-twitch-name {
    color: #fff;
    font-size: 15px;
    font-weight: 700;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    margin-bottom: 2px;
}

.mda-twitch-status-text {
    font-size: 13px;
    color: #898989;
    font-weight: 600;
    text-transform: uppercase;
}

/* KADA JE KORISNIK UŽIVO (TWITCH BOJE) */
.mda-twitch-live {
    border-color: rgba(145, 70, 255, 0.4);
    background: rgba(145, 70, 255, 0.05);
}

.mda-twitch-live .mda-twitch-avatar {
    border-color: #9146ff;
}

.mda-twitch-live .mda-twitch-status-text {
    color: #9146ff;
    font-weight: 800;
}

/* KUTIJA SA SLIKOM STREAMA */
.mda-twitch-stream-box {
    margin-top: 15px;
    background: #111115;
    border-radius: 8px;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    border: 1px solid rgba(145, 70, 255, 0.2);
    text-decoration: none !important;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.mda-twitch-stream-box:hover {
    border-color: rgba(145, 70, 255, 0.6);
    box-shadow: 0 4px 15px rgba(145, 70, 255, 0.15);
}

.mda-twitch-thumbnail-wrap {
    position: relative;
    width: 100%;
    padding-top: 56.25%;
    /* 16:9 format slike */
    background: #000;
}

.mda-twitch-thumbnail {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.mda-twitch-viewers {
    position: absolute;
    bottom: 8px;
    left: 8px;
    background: rgba(0, 0, 0, 0.8);
    color: #fff;
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 12px;
    font-weight: 700;
    display: flex;
    align-items: center;
    gap: 4px;
    backdrop-filter: blur(4px);
}

.mda-twitch-viewers .material-symbols-outlined {
    font-size: 14px;
    color: #e91916;
}

.mda-twitch-stream-details {
    padding: 12px;
}

.mda-twitch-stream-title {
    color: #fff;
    font-size: 13px;
    font-weight: 700;
    line-height: 1.4;
    margin-bottom: 6px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.mda-twitch-stream-game {
    color: #b0b0d0;
    font-size: 12px;
    font-weight: 600;
}