/* --- 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%;
}