/* ============================= */
/* Global layout & typography */
/* ============================= */
body {
    font-family: Arial, sans-serif;
    margin: 20px;
    background-color: #d3d3d3;
    color: #111111;
}

section {
    border: 2px solid #000000;
    padding: 15px;
    margin-bottom: 25px;
    border-radius: 6px;
}

h1 {
    margin-bottom: 20px;
}

h2 {
    margin-top: 0;
    margin-bottom: 10px;
}

/* ============================= */
/* Form controls */
/* ============================= */
label {
    display: block;
    margin-top: 12px;
    font-weight: bold;
}

input,
select,
textarea {
    width: 100%;
    margin-top: 6px;
    padding: 8px;
    font-size: 16px;
    box-sizing: border-box;
    border-radius: 4px;
    border: 1px solid #bbbbbb;
}

textarea {
    resize: vertical;
}

/* ============================= */
/* Primary buttons */
/* ============================= */
button {
    width: 100%;
    margin-top: 12px;
    padding: 10px;
    font-size: 16px;
    cursor: pointer;

    background-color: #0066cc;
    color: #ffffff;
    border: 1px solid #004c99;
    border-radius: 4px;

    transition: background-color 0.15s ease, border-color 0.15s ease;
}

button:hover {
    background-color: #0052a3;
    border-color: #003d80;
}

/* ============================= */
/* Status messages */
/* ============================= */
.status {
    margin-top: 10px;
    font-weight: bold;
}

.status.error {
    color: #b00020;
}

.status.success {
    color: #006400;
}

/* ============================= */
/* Search result buttons */
/* ============================= */
.result-button {
    display: block;
    width: 100%;
    text-align: left;

    padding: 10px;
    margin-top: 10px;

    background-color: #f3f6fa;
    color: #000000;

    border: 1px solid #9aa7b4;
    border-radius: 4px;

    cursor: pointer;

    transition:
        background-color 0.15s ease,
        border-color 0.15s ease,
        box-shadow 0.15s ease;
}

.result-button:hover {
    background-color: #e1ecff;
    border-color: #5a8fd8;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.15);
}

/* ============================= */
/* Search result text hierarchy */
/* ============================= */
.result-button div {
    line-height: 1.3;
    word-wrap: break-word;
}

.result-button div:nth-child(1) {
    font-weight: bold;
    font-size: 15px;
}

.result-button div:nth-child(2) {
    margin-top: 4px;
    font-size: 14px;
    color: #222222;
}

.result-button div:nth-child(3) {
    margin-top: 4px;
    font-size: 12px;
    color: #555555;
}

/* ============================= */
/* Video player */
/* ============================= */
video {
    width: 100%;
    max-width: 720px;
    margin-top: 15px;
    border-radius: 4px;
    border: 1px solid #cccccc;
}

/* ============================= */
/* Dropdown */
/* ============================= */
.dropdown-container {
    position: relative;
}

.dropdown-list {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;

    background-color: #f5f5f5;
    border: 1px solid #aaaaaa;
    max-height: 220px;
    overflow-y: auto;
    z-index: 1000;
}

.dropdown-item {
    padding: 8px;
    cursor: pointer;
}

.dropdown-item:hover {
    background-color: #cce4ff;
}

/* Hide helper for dropdown */
.dropdown-hidden {
    display: none;
}

/* ============================= */
/* Mobile responsiveness */
/* ============================= */
@media (max-width: 768px) {
    body {
        margin: 12px;
    }

    input,
    textarea,
    button {
        font-size: 18px;
        padding: 10px;
    }
}

/* ============================= */
/* COLLAPSIBLE SECTIONS */
/* ============================= */
.section-collapsible {
    margin-top: 1.25rem;
    border-top: 1px solid #ccc;
    padding-top: 0.5rem;
}

.section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.section-header h2 {
    margin: 0;
    font-size: 1.25rem;
}

.collapse-arrow {
    cursor: pointer;
    font-size: 1.5rem;
    user-select: none;
    transition: transform 0.2s ease;

    display: inline-block;
    padding: 8px 12px;
    touch-action: manipulation;

    -webkit-tap-highlight-color: transparent;
    -webkit-touch-callout: none;
}

/* collapsed hides the body */
.section-body.collapsed {
    height: 0;
    overflow: hidden;
    padding: 0;
    margin: 0;
}

.section-body {
    margin-top: 0.75rem;
}

/* ================= Section Backgrounds (entire section) ================= */
#search-play,
.section-collapsible {
    background-color: #d3d3d3;
    padding: 1rem;
    border-radius: 4px;
    margin-bottom: 1rem;
}

.section-collapsible .section-body {
    padding-top: 0.75rem;
}

.section-collapsible .section-body.collapsed {
    padding-top: 0;
    padding-bottom: 0;
}

.section-header {
    padding-bottom: 0.5rem;
    border-bottom: 1px solid #aaa;
}
