/*
 * DT Webinars Player Styles (dtw-player.css)
 */

/* --- Layout --- */
.dtw-player-layout-wrapper {
    display: flex;
    flex-wrap: wrap;
    background: #f4f4f4;
    border: 1px solid #ddd;
    max-width: 1200px;
    margin: 20px auto;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}

.dtw-player-main {
    flex: 1 1 70%;
    min-width: 320px;
    display: flex;
    flex-direction: column;
}

.dtw-player-sidebar {
    flex: 1 1 30%;
    min-width: 300px;
    background: #fff;
    border-left: 1px solid #ddd;
    display: flex;
    flex-direction: column;
    max-height: 80vh;
}

.dtw-video-container {
    position: relative;
    padding-top: 56.25%; /* 16:9 Aspect Ratio */
    background: #000;
}

.dtw-video-container iframe,
.dtw-video-container video {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border: 0;
}

/* --- Offer Bar --- */
.dtw-offer-bar-container {
    display: none;
    background: #a987c2;
    color: #fff;
    padding: 15px 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}
.dtw-offer-content { flex-grow: 1; }
.dtw-offer-content strong { font-size: 1.1em; display: block; }
.dtw-offer-content p { margin: 5px 0 0; opacity: 0.9; }
.dtw-offer-bar-container .dtw-button {
    background: #fff;
    color: #a987c2;
    text-decoration: none;
    padding: 10px 15px;
    border-radius: 5px;
    font-weight: bold;
    margin-left: 15px;
    white-space: nowrap;
}

/* --- Sidebar Tabs --- */
.dtw-tabs { display: flex; border-bottom: 1px solid #eee; }
.dtw-tab-link {
    flex: 1; padding: 12px; background: #f9f9f9; border: none;
    cursor: pointer; font-size: 1em; color: #555;
}
.dtw-tab-link.active {
    background: #fff; font-weight: bold; color: #333;
    border-bottom: 2px solid #a987c2;
}
.dtw-tab-content { display: none; flex-grow: 1; position: relative; }
.dtw-tab-content.active { display: flex; flex-direction: column; }

/* --- Chat Styling (UPDATED COLORS) --- */
#dtw-tab-chat { height: 500px; }
.dtw-chat-messages {
    flex-grow: 1;
    overflow-y: auto;
    padding: 15px;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.dtw-chat-message {
    max-width: 85%;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
}

/* Name Label */
.dtw-chat-message strong {
    font-size: 0.75em;
    color: #6b7280;
    margin-left: 4px;
    margin-bottom: 2px;
}

/* Bubble Base Style */
.dtw-chat-message p {
    margin: 0;
    padding: 10px 14px;
    border-radius: 12px;
    border-bottom-left-radius: 2px; /* Chat bubble tail effect */
    font-size: 0.95em;
    line-height: 1.4;
    position: relative;
    box-shadow: 0 1px 2px rgba(0,0,0,0.05);
}

/* 1. OTHERS (Grey) */
.dtw-chat-message.other p {
    background: #f3f4f6; /* Light Grey */
    color: #1f2937;      /* Dark Grey Text */
    border: 1px solid #e5e7eb;
}

/* 2. ME / ACTIVE CLIENT (Pale Blue) */
.dtw-chat-message.me {
    align-self: flex-end; /* Push to right */
    align-items: flex-end;
}
.dtw-chat-message.me strong {
    margin-right: 4px;
    margin-left: 0;
    text-align: right;
}
.dtw-chat-message.me p {
    background: #e0f2fe; /* Pale Blue */
    color: #0c4a6e;      /* Dark Blue Text */
    border: 1px solid #bae6fd;
    border-radius: 12px;
    border-bottom-right-radius: 2px; /* Tail on right */
    border-bottom-left-radius: 12px;
}

/* 3. HOST (Pale Purple) */
.dtw-chat-message.dtw-admin-message p {
    background-color: #f3e8ff !important; /* Pale Purple */
    color: #581c87 !important;            /* Dark Purple Text */
    border: 1px solid #d8b4fe !important;
}

/* Host Badge */
.dtw-chat-message.dtw-admin-message strong::after {
    content: "HOST";
    font-size: 0.7em;
    font-weight: 800;
    color: #fff;
    background: #a855f7; /* Bright Purple Badge */
    padding: 2px 6px;
    border-radius: 4px;
    margin-left: 6px;
    vertical-align: middle;
    letter-spacing: 0.5px;
}

/* --- Chat Form --- */
.dtw-chat-form { display: flex; padding: 10px; border-top: 1px solid #eee; }
.dtw-chat-form input {
    flex-grow: 1; border: 1px solid #ccc; padding: 10px;
    border-radius: 6px 0 0 6px; outline: none;
}
.dtw-chat-form button {
    border: 1px solid #a987c2; background: #a987c2; color: #fff;
    padding: 0 20px; cursor: pointer; border-radius: 0 6px 6px 0;
    font-weight: 600;
}
.dtw-chat-form button:hover { background: #9671b5; }

/* --- Attendee List --- */
#dtw-attendee-list { flex-grow: 1; overflow-y: auto; margin: 0; padding: 10px; }
#dtw-attendee-list li { list-style: none; padding: 8px 10px; border-bottom: 1px solid #f0f0f0; color: #444; }

/* --- Poll Card Styling --- */
.dtw-chat-poll {
    width: 100%;
    margin: 15px 0;
    background: #fff;
    border: 1px solid #fbcfe8; /* Pink Border */
    border-left: 4px solid #db2777; /* Pink Accent */
    border-radius: 8px;
    padding: 15px;
    box-shadow: 0 4px 6px rgba(0,0,0,0.05);
}
.dtw-poll-header {
    display: flex; align-items: center; gap: 6px;
    color: #db2777; font-size: 0.75em; font-weight: 700;
    text-transform: uppercase; margin-bottom: 8px; letter-spacing: 0.5px;
}
.dtw-poll-question {
    font-weight: 700; font-size: 1em; margin: 0 0 15px 0; color: #111;
}
.dtw-poll-options { display: flex; flex-direction: column; gap: 8px; }
.dtw-poll-btn {
    background: #fff; border: 1px solid #ddd; color: #444;
    padding: 10px; border-radius: 6px; cursor: pointer;
    font-weight: 500; text-align: left; transition: all 0.2s;
}
.dtw-poll-btn:hover { background: #fdf2f8; border-color: #db2777; color: #db2777; }
.dtw-poll-btn.selected { background: #db2777; color: #fff; border-color: #db2777; }
.dtw-poll-btn.disabled { opacity: 0.6; cursor: default; pointer-events: none; }
.dtw-poll-thanks { text-align: center; color: #15803d; font-weight: bold; padding: 10px; }