.trp-player {
    box-sizing: border-box;
    max-width: 100%;
    width: 100%;
    margin: 24px auto;
    padding: 26px;
    background: linear-gradient(145deg, #ffffff, #f2f5fa);
    color: #19283d;
    border: 1px solid #dce3ec;
    border-radius: 22px;
    box-shadow: 0 12px 36px rgba(20, 40, 70, .10);
    font-family: Arial, Helvetica, sans-serif;
    line-height: 1.5;
}
.trp-player * { box-sizing: border-box; }
.trp-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
    margin-bottom: 28px;
}
.trp-header strong { font-size: 21px; line-height: 1.3; }
.trp-live {
    flex-shrink: 0;
    padding: 5px 12px;
    border-radius: 20px;
    background: #ae1e30;
    color: white;
    font-size: 12px;
    font-weight: 800;
    letter-spacing: 1px;
}
.trp-caption {
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 1.3px;
    color: #66758a;
}
.trp-title {
    font-size: 23px;
    font-weight: 700;
    line-height: 1.4;
    min-height: 64px;
    margin: 10px 0 22px;
    overflow-wrap: anywhere;
}
.trp-player .trp-play {
    display: flex;
    align-items: center;
    justify-content: flex-start;
    gap: 18px;
    width: 100%;
    padding: 9px 18px 9px 9px;
    border: 1px solid #cdd9e8;
    border-radius: 999px;
    background: #e8eef7;
    color: #172b48;
    cursor: pointer;
    font-size: 20px;
    font-weight: 700;
    text-align: left;
    transition: background .2s, transform .2s;
}
.trp-player .trp-play:hover { background: #dce7f5; }
.trp-player .trp-play:active { transform: scale(.98); }
.trp-player .trp-play:focus-visible {
    outline: 3px solid #276cc4;
    outline-offset: 4px;
}
.trp-play-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    width: 72px;
    height: 72px;
    border-radius: 50%;
    background: #173d73;
    color: #ffffff;
    font-size: 28px;
    box-shadow: 0 4px 12px rgba(20, 50, 90, .22);
}
.trp-play.is-playing .trp-play-icon { background: #a32637; }
.trp-volume {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin: 26px 0;
    font-size: 16px;
    font-weight: 600;
}
.trp-volume input {
    width: 100%;
    height: 28px;
    cursor: pointer;
    accent-color: #173d73;
}
.trp-history {
    padding: 20px 0;
    border-top: 1px solid #dce3ec;
}
.trp-history > strong { font-size: 17px; }
.trp-history-list {
    list-style: none;
    padding: 0;
    margin: 14px 0 0;
    color: #42536a;
    font-size: 15px;
    line-height: 1.5;
    border: 1px solid #dce3ec;
    border-radius: 8px;
    overflow: hidden;
}
.trp-history-list li {
    padding: 10px 12px;
    overflow-wrap: anywhere;
}
.trp-history-list li + li {
    border-top: 1px solid #dce3ec;
}
.trp-history-entry {
    display: grid;
    grid-template-columns: 44px minmax(0, 1fr);
    gap: 6px;
    align-items: start;
}
.trp-history-time {
    color: #173d73;
    font-size: 14px;
    font-weight: 600;
    font-variant-numeric: tabular-nums;
    white-space: nowrap;
}
.trp-history-title {
    min-width: 0;
    overflow-wrap: anywhere;
}
.trp-listeners {
    padding: 16px 0 4px;
    border-top: 1px solid #dce3ec;
    text-align: center;
    color: #43546b;
    font-size: 15px;
    font-weight: 600;
}
.trp-status {
    margin-top: 10px;
    text-align: center;
    font-size: 14px;
    color: #52657d;
}
.trp-status:empty { display: none; }
.trp-player audio { display: none; }
@media (max-width: 480px) {
    .trp-player { padding: 19px; border-radius: 16px; }
    .trp-header strong { font-size: 18px; }
    .trp-title { font-size: 21px; }
    .trp-play-icon { width: 64px; height: 64px; }
    .trp-player .trp-play { font-size: 18px; }
}
@media (prefers-reduced-motion: reduce) {
    .trp-player .trp-play { transition: none; }
}

/* Imaginea apare numai in aplicatia PWA instalata */
.trp-pwa-brand {
    display: none;
    max-width: 480px;
    margin: 20px auto 0;
    text-align: center;
}
.trp-pwa-brand img {
    display: block;
    width: 100%;
    max-width: 340px;
    height: auto;
    margin: 0 auto;
    border-radius: 14px;
}
@media (display-mode: standalone) {
    .trp-pwa-brand { display: block; }
}
body.trp-pwa-standalone .trp-pwa-brand {
    display: block;
}

/* Notificare instalare PWA */
.trp-install-prompt[hidden],
.trp-install-help[hidden] {
    display: none !important;
}
.trp-install-prompt {
    position: fixed;
    z-index: 99999;
    left: 50%;
    bottom: 16px;
    transform: translateX(-50%);
    box-sizing: border-box;
    width: calc(100% - 32px);
    max-width: 460px;
    padding: 20px;
    padding-bottom: max(20px, env(safe-area-inset-bottom));
    background: #ffffff;
    color: #19283d;
    border: 1px solid #d6dfeb;
    border-radius: 18px;
    box-shadow: 0 8px 36px rgba(0, 0, 0, .24);
    font-family: Arial, Helvetica, sans-serif;
}
.trp-install-info {
    display: flex;
    align-items: center;
    gap: 14px;
}
.trp-install-info img {
    width: 56px;
    height: 56px;
    object-fit: contain;
    flex-shrink: 0;
    border-radius: 10px;
}
.trp-install-info strong {
    display: block;
    font-size: 17px;
    line-height: 1.4;
}
.trp-install-info p {
    margin: 5px 0 0;
    color: #53647a;
    font-size: 14px;
    line-height: 1.5;
}
.trp-install-help {
    margin: 15px 0 0;
    font-size: 15px;
    line-height: 1.6;
}
.trp-install-actions {
    display: flex;
    gap: 10px;
    margin-top: 18px;
}
.trp-install-actions button {
    min-height: 48px;
    padding: 10px 14px;
    border-radius: 11px;
    cursor: pointer;
    font-size: 15px;
    font-weight: 700;
}
.trp-install-now {
    flex: 1;
    border: 0;
    background: #173d73;
    color: white;
}
.trp-install-later {
    border: 1px solid #cfd8e5;
    background: #f1f4f8;
    color: #24364e;
}
.trp-install-actions button:focus-visible {
    outline: 3px solid #3278d0;
    outline-offset: 3px;
}
@media (max-width: 380px) {
    .trp-install-prompt {
        bottom: 8px;
        padding: 15px;
    }
    .trp-install-info strong { font-size: 15px; }
    .trp-install-actions button { font-size: 14px; }
}


/* TRP FULL TITLE DISPLAY */
.trp-player .trp-title {
    font-size: clamp(23px, 4vw, 30px) !important;
    font-weight: 700 !important;
    line-height: 1.3 !important;
    text-align: center !important;

    display: block !important;
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
    padding-left: 8px;
    padding-right: 8px;

    white-space: normal !important;
    overflow-wrap: anywhere;
    word-break: normal;
    text-overflow: clip !important;
    overflow: visible !important;

    height: auto !important;
    max-height: none !important;
    -webkit-line-clamp: unset !important;

    text-wrap: balance;
}

/* TRP LISTENING TIMER */
.trp-player .trp-play .trp-play-label {
    flex: 1 1 auto;
    min-width: 0;
}

.trp-player .trp-play .trp-play-timer[hidden] {
    display: none !important;
}

.trp-player .trp-play .trp-play-timer:not([hidden]) {
    display: inline-block !important;
    flex: 0 0 auto;
    margin-left: auto;
    color: #365473;
    font-family: Arial, Helvetica, sans-serif;
    font-size: inherit;
    font-weight: 700;
    font-variant-numeric: tabular-nums;
    white-space: nowrap;
    letter-spacing: 0;
}
