/*
 * Global styles for the RadioAccess website.
 * The default colour scheme uses a deep blue gradient reminiscent of night radio.
 * High contrast mode flips backgrounds to black and text to white for users with
 * low vision. A large‑font mode increases text size across the site.  The
 * layout is responsive: the iframe adjusts to fill the available space below
 * the fixed header.
 */

html, body {
    margin: 0;
    padding: 0;
    height: 100%;
    /* Use a modern sans-serif font family for a professional look */
    font-family: 'Segoe UI', 'Helvetica Neue', Arial, sans-serif;
    background: linear-gradient(180deg, #0f2255 0%, #1a3b78 100%);
    color: #f0f0f0;
}

/* Skip links become visible on focus to aid keyboard navigation */
.skip-link {
    position: absolute;
    left: -999px;
    top: 0;
    background: #000;
    color: #fff;
    padding: 0.5rem 1rem;
    z-index: 1000;
}
.skip-link:focus {
    left: 0;
}

/* Accessibility controls */
.accessibility-controls {
    display: flex;
    gap: 1rem;
    padding: 0.5rem;
    background: rgba(0, 0, 0, 0.4);
    justify-content: center;
}
.accessibility-controls button {
    background: #ffffff;
    color: #000;
    border: none;
    padding: 0.5rem 1rem;
    border-radius: 0.5rem;
    cursor: pointer;
    font-size: 1rem;
}
.accessibility-controls button:hover {
    background: #e0e0e0;
}

/* Player container */
.player-container {
    text-align: center;
    padding: 1rem;
    background: rgba(0, 0, 0, 0.7);
    border-radius: 0.5rem;
    box-shadow: 0 6px 12px rgba(0, 0, 0, 0.6);
}
.radio-controls button {
    margin: 0.25rem;
    padding: 0.5rem 0.75rem;
    border: none;
    border-radius: 0.5rem;
    cursor: pointer;
    font-weight: bold;
    background: #003d80;
    color: #fff;
    transition: background 0.2s;
}
.radio-controls button:hover {
    background: #0053a5;
    color: #fff;
}
.current-track {
    margin-top: 0.5rem;
    font-size: 1.1rem;
    font-weight: bold;
}

/* Search area */
.search-area {
    padding: 1rem;
    background: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(4px);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    border-bottom: 1px solid rgba(255,255,255,0.1);
}
.search-area input[type="search"] {
    padding: 0.4rem 0.6rem;
    border-radius: 0.25rem;
    border: 1px solid #aaa;
    min-width: 240px;
    background: rgba(255,255,255,0.1);
    color: #fff;
    transition: border-color 0.2s;
}
.search-area input[type="search"]:focus {
    border-color: #ffd700;
    outline: none;
}
.search-area button {
    padding: 0.45rem 0.8rem;
    border: none;
    border-radius: 0.25rem;
    background: #0066cc;
    color: #fff;
    cursor: pointer;
    transition: background 0.2s;
}
.search-area button:hover {
    background: #004fa3;
}

/* Navigation */
.main-nav {
    background: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(4px);
    box-shadow: 0 2px 4px rgba(0,0,0,0.5);
}
.main-nav ul {
    display: flex;
    margin: 0;
    padding: 0;
    list-style: none;
    overflow-x: auto;
}
.main-nav li {
    flex: 1 1 auto;
}
.main-nav a {
    display: block;
    padding: 1rem;
    text-align: center;
    color: #f0f0f0;
    text-decoration: none;
    transition: background 0.3s, color 0.3s;
    font-weight: 600;
}
.main-nav a:hover {
    background: rgba(255, 255, 255, 0.15);
    color: #ffd700;
}

/* Content area */
.content-area {
    /* Adjust the height to account for the header, navigation, search and footer.  */
    height: calc(100vh - 420px);
    display: block;
    overflow: hidden;
}
#content-frame {
    width: 100%;
    height: 100%;
    border: none;
    border-radius: 0.5rem;
    box-shadow: 0 4px 8px rgba(0,0,0,0.5);
}

/* Visually hidden class used for live announcer */
.visually-hidden {
    position: absolute;
    width: 1px;
    height: 1px;
    margin: -1px;
    padding: 0;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

/* High contrast mode */
body.high-contrast {
    background: #000;
    color: #fff;
}
body.high-contrast .main-nav {
    background: #000;
}
body.high-contrast .main-nav a {
    color: #fff;
}
body.high-contrast .accessibility-controls button {
    background: #222;
    color: #fff;
}
body.high-contrast .radio-controls button {
    background: #222;
    color: #fff;
}
body.high-contrast .search-area {
    background: #000;
}
body.high-contrast input[type="search"] {
    background: #222;
    color: #fff;
    border-color: #555;
}

/* Large font mode */
body.large-font {
    font-size: 1.2em;
}

/* Chat page styles */
.chat-entry {
    padding: 0.5rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.2);
}
.chat-entry strong {
    color: #ffd700;
}
.chat-entry small {
    color: #a0a0a0;
    margin-left: 0.5rem;
}
.chat-entry a {
    color: #ff8080;
    margin-left: 0.5rem;
    text-decoration: underline;
    cursor: pointer;
}

/* Table styling for admin pages */
table.admin-table {
    width: 100%;
    border-collapse: collapse;
    margin-bottom: 1rem;
}
table.admin-table th, table.admin-table td {
    border: 1px solid #555;
    padding: 0.5rem;
    text-align: left;
}
table.admin-table th {
    background: rgba(0, 0, 0, 0.6);
    color: #fff;
}

/* Form styling */
form label {
    display: block;
    margin-top: 0.5rem;
}
form input[type="text"], form input[type="password"], form input[type="search"], form textarea {
    width: 100%;
    padding: 0.4rem;
    border-radius: 0.25rem;
    border: 1px solid #ccc;
    box-sizing: border-box;
    margin-top: 0.2rem;
}
form button {
    margin-top: 0.5rem;
    padding: 0.5rem 1rem;
    border: none;
    border-radius: 0.5rem;
    background: #0066cc;
    color: #fff;
    cursor: pointer;
    font-weight: 600;
    transition: background 0.2s;
}
form button:hover {
    background: #004fa3;
}
/* Breadcrumb styles */
.breadcrumb {
  font-size: 0.9rem;
  margin-bottom: 0.5rem;
}
.breadcrumb a {
  color: #007bff;
  text-decoration: none;
}
.breadcrumb a:hover {
  text-decoration: underline;
}
.breadcrumb span {
  color: #ffe082;
}
/* Card styling for news and podcast lists */
.news-item, .podcast-item {
    background: rgba(255, 255, 255, 0.1);
    border-radius: 0.5rem;
    padding: 1rem;
    margin-bottom: 1rem;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
}
.news-item h2 a, .podcast-item h2 a {
    color: #ffd700;
    text-decoration: none;
}
.news-item h2 a:hover, .podcast-item h2 a:hover {
    text-decoration: underline;
}

/* Article and podcast content styling */
.article-body, .podcast-content {
    background: rgba(255, 255, 255, 0.1);
    padding: 1rem;
    border-radius: 0.5rem;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
}

/* Admin section headings */
h2 {
    border-bottom: 2px solid rgba(255,255,255,0.3);
    padding-bottom: 0.3rem;
    margin-top: 1.5rem;
}
.breadcrumb a + a::before, .breadcrumb a + span::before, .breadcrumb span + span::before {
  content: ' > ';
}
