/* 
  Multi-Monitor Advertisement Display Manager Styling
  Contains premium styles for Dashboard Control and Player Canvas (Preset C)
*/

@import url('https://fonts.googleapis.com/css2?family=Outfit:wght@300;400;500;600;700&display=swap');

:root {
    --bg-dark: #0f1115;
    --bg-card: #181c24;
    --bg-input: #222834;
    --text-main: #f3f4f6;
    --text-muted: #9ca3af;
    --primary: #4f46e5;
    --primary-hover: #4338ca;
    --secondary: #0ea5e9;
    --success: #10b981;
    --warning: #f59e0b;
    --danger: #ef4444;
    --border: #2e3748;
    --font: 'Outfit', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    --radius: 12px;
}

/* Global Resets */
* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    background-color: var(--bg-dark);
    color: var(--text-main);
    font-family: var(--font);
    -webkit-font-smoothing: antialiased;
    line-height: 1.5;
}

/* Dashboard Layout */
.dashboard-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 30px 20px;
}

.app-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 30px;
    border-bottom: 1px solid var(--border);
    padding-bottom: 15px;
}

.app-header h1 {
    font-size: 2.2rem;
    font-weight: 700;
    background: linear-gradient(135deg, #a5b4fc 0%, #6366f1 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.status-indicator {
    background-color: var(--bg-card);
    border: 1px solid var(--border);
    padding: 6px 14px;
    border-radius: 20px;
    font-size: 0.9rem;
    font-weight: 500;
}

#sync-status.online {
    color: var(--success);
}
#sync-status.offline {
    color: var(--text-muted);
}

.dashboard-main {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 25px;
}

@media (max-width: 900px) {
    .dashboard-main {
        grid-template-columns: 1fr;
    }
}

.playlist-card {
    grid-column: 1 / -1;
}

/* Cards & Styling */
.card {
    background-color: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 24px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.2);
}

.card h2 {
    font-size: 1.3rem;
    margin-bottom: 20px;
    font-weight: 600;
    color: #e5e7eb;
}

.form-group {
    margin-bottom: 20px;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.form-group label {
    font-size: 0.9rem;
    color: var(--text-muted);
    font-weight: 500;
}

input, select {
    background-color: var(--bg-input);
    border: 1px solid var(--border);
    color: var(--text-main);
    padding: 12px 16px;
    border-radius: 8px;
    font-size: 1rem;
    font-family: var(--font);
    outline: none;
    transition: border-color 0.2s;
}

input:focus, select:focus {
    border-color: var(--primary);
}

input::placeholder {
    color: #4b5563;
}

/* Buttons */
.btn {
    display: inline-block;
    padding: 12px 20px;
    font-size: 1rem;
    font-weight: 500;
    border-radius: 8px;
    border: none;
    cursor: pointer;
    text-align: center;
    transition: background-color 0.2s, opacity 0.2s;
    font-family: var(--font);
}

.btn:disabled {
    opacity: 0.4;
    cursor: not-allowed;
}

.btn-primary {
    background-color: var(--primary);
    color: white;
}
.btn-primary:hover:not(:disabled) {
    background-color: var(--primary-hover);
}

.btn-secondary {
    background-color: #374151;
    color: var(--text-main);
}
.btn-secondary:hover:not(:disabled) {
    background-color: #4b5563;
}

.btn-success {
    background-color: var(--success);
    color: white;
}
.btn-success:hover:not(:disabled) {
    opacity: 0.9;
}

.btn-warning {
    background-color: var(--warning);
    color: black;
}
.btn-warning:hover:not(:disabled) {
    opacity: 0.9;
}

.button-group {
    display: flex;
    gap: 12px;
}

/* Table styling */
.table-container {
    overflow-x: auto;
    border: 1px solid var(--border);
    border-radius: 8px;
}

table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.95rem;
}

th, td {
    padding: 14px 16px;
    text-align: left;
    border-bottom: 1px solid var(--border);
}

th {
    background-color: #1c222d;
    color: var(--text-muted);
    font-weight: 500;
}

td {
    color: var(--text-main);
}

tr:last-child td {
    border-bottom: none;
}

.empty-state {
    text-align: center;
    color: var(--text-muted);
    padding: 30px;
}

/* ==========================================================================
   Player Window Grid Layout (Preset C)
   ========================================================================== */
.player-grid {
    display: grid;
    width: 100vw;
    height: 100vh;
    margin: 0;
    padding: 0;
    overflow: hidden;
    grid-template-columns: 70vw 30vw;
    grid-template-rows: 85vh 15vh;
    grid-template-areas: 
        "main sidebar"
        "ticker sidebar";
}

.player-zone {
    width: 100%;
    height: 100%;
    position: relative;
    overflow: hidden;
    display: flex;
    justify-content: center;
    align-items: center;
}

.zone-main {
    grid-area: main;
    background-color: #111;
}

.zone-sidebar {
    grid-area: sidebar;
    background-color: #181818;
}

.zone-ticker {
    grid-area: ticker;
    background-color: #0c0c0c;
    justify-content: flex-start;
}

/* Zone contents containers */
.zone-content-container {
    width: 100%;
    height: 100%;
    position: absolute;
    top: 0;
    left: 0;
    display: flex;
    justify-content: center;
    align-items: center;
    background-color: black;
}

.zone-content-container img, 
.zone-content-container video,
.zone-content-container iframe {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border: none;
    position: absolute;
    top: 0;
    left: 0;
}

.zone-placeholder {
    color: #4b5563;
    text-align: center;
}

.zone-placeholder h2 {
    font-size: 1.8rem;
    margin-bottom: 10px;
}

.hidden {
    display: none !important;
}

/* Scrolling Text Ticker classes */
.ticker-wrapper {
    width: 100%;
    overflow: hidden;
    white-space: nowrap;
    display: flex;
    align-items: center;
    padding: 0 20px;
}

.ticker-item {
    display: inline-block;
    font-size: 4rem;
    font-weight: 600;
    color: #ffffff;
    animation: marquee 25s linear infinite;
    padding-left: 100%;
}

@keyframes marquee {
    0% { transform: translate3d(0, 0, 0); }
    100% { transform: translate3d(-100%, 0, 0); }
}

/* Slide transition classes */
.fade-in {
    animation: fadeIn 0.4s ease-out forwards;
}

.fade-out {
    animation: fadeOut 0.4s ease-out forwards;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes fadeOut {
    from { opacity: 1; }
    to { opacity: 0; }
}
