/* ============================================
   RadioGet — Widget Styles (Chat + Player)
   ============================================ */

/* Widget section */
.widget-section {
    padding: 20px 16px;
    max-width: 600px;
    margin: 0 auto;
}

.widget-container {
    background: #1a1a2e;
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
    border: 1px solid #2a2a4a;
}

.widget-header {
    padding: 16px 20px;
    background: #16213e;
    font-size: 15px;
    color: #888;
}

/* Chat messages area */
.chat-messages {
    height: 400px;
    overflow-y: auto;
    padding: 16px;
    scroll-behavior: smooth;
}

.chat-message {
    margin-bottom: 12px;
}

.chat-message.user {
    text-align: right;
}

.chat-message.user .bubble {
    background: #1a73e8;
    color: white;
    display: inline-block;
    padding: 8px 14px;
    border-radius: 12px 12px 4px 12px;
    max-width: 80%;
    font-size: 14px;
}

.chat-message.system .bubble {
    background: #222;
    color: #aaa;
    display: inline-block;
    padding: 8px 14px;
    border-radius: 12px;
    font-size: 13px;
}

/* Station cards */
.station-card {
    background: #111;
    border: 1px solid #333;
    border-radius: 12px;
    padding: 12px;
    margin: 8px 0;
    display: flex;
    align-items: center;
    gap: 12px;
    cursor: pointer;
    transition: border-color 0.2s;
}

.station-card:hover {
    border-color: #1a73e8;
}

.station-card .station-favicon {
    width: 40px;
    height: 40px;
    border-radius: 8px;
    background: #222;
    object-fit: cover;
    flex-shrink: 0;
}

.station-card .station-info {
    flex: 1;
    min-width: 0;
}

.station-card .station-name {
    font-weight: 600;
    font-size: 14px;
    color: #fff;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.station-card .station-meta {
    font-size: 12px;
    color: #888;
    margin-top: 4px;
}

.station-card .station-tags {
    display: flex;
    gap: 4px;
    flex-wrap: wrap;
    margin-top: 6px;
}

.station-card .tag {
    background: #1a1a3e;
    color: #60a5fa;
    padding: 2px 8px;
    border-radius: 10px;
    font-size: 11px;
    white-space: nowrap;
}

.station-card .play-btn {
    background: #1a73e8;
    border: none;
    color: white;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    cursor: pointer;
    font-size: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    transition: background 0.2s;
}

.station-card .play-btn:hover {
    background: #1557b0;
}

/* Show more button */
.show-more-btn {
    background: transparent;
    border: 1px solid #333;
    color: #60a5fa;
    padding: 8px 20px;
    border-radius: 10px;
    cursor: pointer;
    font-size: 13px;
    font-family: inherit;
    transition: border-color 0.2s, background 0.2s;
}

.show-more-btn:hover {
    border-color: #1a73e8;
    background: rgba(26, 115, 232, 0.1);
}

/* Chat input area */
.chat-input-area {
    display: flex;
    padding: 12px;
    gap: 8px;
    border-top: 1px solid #222;
    background: #0f0f1a;
}

.chat-input-area input {
    flex: 1;
    padding: 10px 14px;
    border: 1px solid #333;
    border-radius: 10px;
    background: #111;
    color: #fff;
    font-size: 14px;
    outline: none;
    font-family: inherit;
}

.chat-input-area input:focus {
    border-color: #1a73e8;
}

.chat-input-area input::placeholder {
    color: #555;
}

.chat-input-area button {
    background: #1a73e8;
    border: none;
    color: white;
    padding: 10px 16px;
    border-radius: 10px;
    cursor: pointer;
    font-size: 14px;
    font-family: inherit;
    font-weight: 600;
    transition: background 0.2s;
}

.chat-input-area button:hover {
    background: #1557b0;
}

/* Player bar */
.player-container {
    display: none;
}

.player-container.active {
    display: block;
}

.player-bar {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 16px;
    background: #16213e;
    border-top: 1px solid #333;
}

.player-bar .now-playing {
    flex: 1;
    overflow: hidden;
    min-width: 0;
}

.player-bar .now-playing .station-name {
    font-size: 13px;
    font-weight: 600;
    color: #fff;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.player-bar .now-playing .station-tags {
    font-size: 11px;
    color: #888;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.player-bar button {
    background: none;
    border: none;
    color: #fff;
    font-size: 20px;
    cursor: pointer;
    padding: 4px;
    flex-shrink: 0;
}

.player-bar button:hover {
    color: #1a73e8;
}

.player-bar input[type="range"] {
    width: 80px;
    accent-color: #1a73e8;
    flex-shrink: 0;
}

/* Widget prompt (logged out) */
.widget-prompt {
    max-width: 600px;
    margin: 0 auto;
    padding: 20px 16px;
}

/* Scrollbar styling */
.chat-messages::-webkit-scrollbar {
    width: 6px;
}

.chat-messages::-webkit-scrollbar-track {
    background: transparent;
}

.chat-messages::-webkit-scrollbar-thumb {
    background: #333;
    border-radius: 3px;
}

/* Responsive */
@media (max-width: 480px) {
    .chat-messages {
        height: 320px;
    }

    .station-card {
        padding: 10px;
        gap: 8px;
    }

    .station-card .station-favicon {
        width: 32px;
        height: 32px;
    }

    .station-card .play-btn {
        width: 32px;
        height: 32px;
        font-size: 14px;
    }

    .player-bar input[type="range"] {
        width: 60px;
    }
}
