/* =====================================================
   BT DJ PRO – Front-end Stylesheet
   Divi-compatible, Mobile-responsive
===================================================== */

/* ---- Reset / Base ---- */
.btdjpro-wrap *,
.btdjpro-dashboard-wrap * {
    box-sizing: border-box;
}

/* =====================================================
   REQUEST FORM CARD
===================================================== */
.btdjpro-wrap {
    max-width: 680px;
    margin: 0 auto;
    padding: 20px 16px;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

.btdjpro-form-card {
    background: #1a1a2e;
    border-radius: 20px;
    padding: 36px 32px;
    box-shadow: 0 20px 60px rgba(0,0,0,0.5);
    color: #eee;
}

.btdjpro-form-header {
    text-align: center;
    margin-bottom: 28px;
}
.btdjpro-form-header .btdjpro-icon {
    font-size: 3rem;
    display: block;
    margin-bottom: 8px;
}
.btdjpro-form-header h2 {
    margin: 0 0 6px;
    font-size: 1.8rem;
    color: #fff;
    font-weight: 700;
}
.btdjpro-form-header p {
    margin: 0;
    color: #aaa;
    font-size: 1rem;
}

/* ---- Fields ---- */
.btdjpro-field {
    margin-bottom: 20px;
    position: relative;
}
.btdjpro-field label {
    display: block;
    font-size: 0.9rem;
    color: #bbb;
    margin-bottom: 8px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}
.btdjpro-field label .req {
    color: #e74c3c;
}

.btdjpro-field input[type="text"],
.btdjpro-field textarea {
    width: 100%;
    padding: 14px 18px;
    background: #0f0f23;
    border: 2px solid #2a2a4a;
    border-radius: 12px;
    color: #fff;
    font-size: 1rem;
    transition: border-color .2s, box-shadow .2s;
    outline: none;
    -webkit-appearance: none;
}
.btdjpro-field input[type="text"]:focus,
.btdjpro-field textarea:focus {
    border-color: #1db954;
    box-shadow: 0 0 0 3px rgba(29,185,84,.2);
}
.btdjpro-field textarea {
    resize: vertical;
    min-height: 90px;
}

/* ---- Spotify search wrapper ---- */
.btdjpro-search-wrapper {
    position: relative;
}
.btdjpro-search-icon {
    position: absolute;
    right: 14px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 1.1rem;
    pointer-events: none;
    opacity: .6;
}
#btdjpro-search {
    padding-right: 42px;
}

/* ---- Dropdown ---- */
.btdjpro-dropdown {
    position: absolute;
    left: 0;
    right: 0;
    top: calc(100% + 6px);
    background: #1a1a3a;
    border: 2px solid #1db954;
    border-radius: 14px;
    max-height: 320px;
    overflow-y: auto;
    z-index: 9999;
    box-shadow: 0 16px 40px rgba(0,0,0,.7);
}
.btdjpro-dropdown:empty {
    display: none !important;
}
.btdjpro-dropdown-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 16px;
    cursor: pointer;
    transition: background .15s;
    border-bottom: 1px solid rgba(255,255,255,.05);
}
.btdjpro-dropdown-item:last-child {
    border-bottom: none;
}
.btdjpro-dropdown-item:hover,
.btdjpro-dropdown-item:focus {
    background: rgba(29,185,84,.15);
    outline: none;
}
.btdjpro-dropdown-item img {
    width: 46px;
    height: 46px;
    border-radius: 6px;
    object-fit: cover;
    flex-shrink: 0;
    background: #333;
}
.btdjpro-dropdown-placeholder {
    width: 46px;
    height: 46px;
    border-radius: 6px;
    background: #333;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.4rem;
    flex-shrink: 0;
}
.btdjpro-dropdown-meta strong {
    display: block;
    color: #fff;
    font-size: .95rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 260px;
}
.btdjpro-dropdown-meta span {
    color: #aaa;
    font-size: .8rem;
}
.btdjpro-dropdown-loading,
.btdjpro-dropdown-empty {
    padding: 16px;
    text-align: center;
    color: #888;
    font-size: .9rem;
}

/* ---- Cover preview ---- */
.btdjpro-cover-preview {
    display: flex;
    align-items: center;
    gap: 14px;
    margin-top: 12px;
    background: rgba(29,185,84,.08);
    border: 2px solid #1db954;
    border-radius: 14px;
    padding: 14px;
    position: relative;
}
.btdjpro-cover-preview img {
    width: 60px;
    height: 60px;
    border-radius: 8px;
    object-fit: cover;
    flex-shrink: 0;
}
.btdjpro-cover-meta {
    flex: 1;
    min-width: 0;
}
.btdjpro-cover-meta strong {
    display: block;
    color: #fff;
    font-size: 1rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.btdjpro-cover-meta span {
    color: #1db954;
    font-size: .85rem;
}
#btdjpro-cover-clear {
    background: rgba(255,255,255,.1);
    border: none;
    color: #fff;
    width: 30px;
    height: 30px;
    border-radius: 50%;
    cursor: pointer;
    font-size: .9rem;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background .2s;
}
#btdjpro-cover-clear:hover {
    background: rgba(231,76,60,.6);
}

/* ---- Notices ---- */
.btdjpro-notice {
    padding: 14px 18px;
    border-radius: 10px;
    margin-bottom: 18px;
    font-weight: 600;
    font-size: .95rem;
}
.btdjpro-notice--success {
    background: rgba(29,185,84,.15);
    border: 2px solid #1db954;
    color: #1db954;
}
.btdjpro-notice--error {
    background: rgba(231,76,60,.15);
    border: 2px solid #e74c3c;
    color: #e74c3c;
}

/* ---- Submit Button ---- */
.btdjpro-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 16px 28px;
    border: none;
    border-radius: 50px;
    cursor: pointer;
    font-size: 1rem;
    font-weight: 700;
    transition: transform .15s, box-shadow .15s, opacity .15s;
    text-decoration: none;
}
.btdjpro-btn:disabled {
    opacity: .5;
    cursor: not-allowed;
}
.btdjpro-btn--primary {
    background: linear-gradient(135deg, #1db954, #17a047);
    color: #fff;
    width: 100%;
    justify-content: center;
    font-size: 1.1rem;
    padding: 18px;
    box-shadow: 0 6px 24px rgba(29,185,84,.4);
}
.btdjpro-btn--primary:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: 0 10px 30px rgba(29,185,84,.5);
}
.btdjpro-btn--secondary {
    background: rgba(255,255,255,.1);
    color: #fff;
    border: 2px solid rgba(255,255,255,.2);
}
.btdjpro-btn--secondary:hover {
    background: rgba(255,255,255,.2);
}
.btdjpro-btn--danger {
    background: rgba(231,76,60,.2);
    color: #e74c3c;
    border: 2px solid #e74c3c;
}
.btdjpro-btn--danger:hover {
    background: #e74c3c;
    color: #fff;
}

/* =====================================================
   DJ DASHBOARD
===================================================== */
.btdjpro-dashboard-wrap {
    background: #0d0d1a;
    border-radius: 20px;
    padding: 24px;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    color: #eee;
    min-height: 200px;
}

.btdjpro-dash-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 14px;
    margin-bottom: 24px;
    padding-bottom: 18px;
    border-bottom: 2px solid rgba(255,255,255,.08);
}
.btdjpro-dash-title {
    display: flex;
    align-items: center;
    gap: 10px;
}
.btdjpro-dash-title span {
    font-size: 2rem;
}
.btdjpro-dash-title h2 {
    margin: 0;
    font-size: 1.5rem;
    color: #fff;
    font-weight: 700;
}
.btdjpro-dash-actions {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}

.btdjpro-badge {
    background: #1db954;
    color: #000;
    padding: 4px 12px;
    border-radius: 50px;
    font-size: .85rem;
    font-weight: 700;
}

/* ---- Request items ---- */
.btdjpro-requests {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.btdjpro-request-item {
    display: flex;
    align-items: center;
    gap: 14px;
    background: #1a1a2e;
    border-radius: 16px;
    padding: 16px;
    border-left: 5px solid #1db954;
    transition: border-color .2s, opacity .2s;
    animation: btdjpro-fadein .3s ease;
}
.btdjpro-request-item.is-played {
    border-left-color: #e74c3c;
    opacity: .7;
}
@keyframes btdjpro-fadein {
    from { opacity: 0; transform: translateY(-6px); }
    to   { opacity: 1; transform: translateY(0); }
}

.btdjpro-request-cover {
    width: 64px;
    height: 64px;
    border-radius: 10px;
    object-fit: cover;
    flex-shrink: 0;
    background: #0f0f23;
}
.btdjpro-request-cover-placeholder {
    width: 64px;
    height: 64px;
    border-radius: 10px;
    background: linear-gradient(135deg, #1a1a3a, #2a2a5a);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.8rem;
    flex-shrink: 0;
}

.btdjpro-request-meta {
    flex: 1;
    min-width: 0;
}
.btdjpro-request-meta .req-name {
    font-size: .78rem;
    color: #888;
    text-transform: uppercase;
    letter-spacing: .05em;
    margin-bottom: 2px;
}
.btdjpro-request-meta .req-track {
    font-size: 1.05rem;
    font-weight: 700;
    color: #fff;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.btdjpro-request-meta .req-artist {
    font-size: .88rem;
    color: #1db954;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.btdjpro-request-meta .req-notes {
    font-size: .8rem;
    color: #777;
    margin-top: 4px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.btdjpro-request-meta .req-time {
    font-size: .72rem;
    color: #555;
    margin-top: 2px;
}

.btdjpro-request-actions {
    display: flex;
    flex-direction: column;
    gap: 8px;
    flex-shrink: 0;
}

.btdjpro-toggle-btn {
    padding: 10px 18px;
    border-radius: 50px;
    border: 2px solid #1db954;
    background: transparent;
    color: #1db954;
    font-weight: 700;
    font-size: .85rem;
    cursor: pointer;
    white-space: nowrap;
    transition: all .15s;
}
.btdjpro-toggle-btn:hover {
    background: #1db954;
    color: #000;
}
.btdjpro-toggle-btn.is-played {
    border-color: #e74c3c;
    color: #e74c3c;
}
.btdjpro-toggle-btn.is-played:hover {
    background: #e74c3c;
    color: #fff;
}

.btdjpro-delete-btn {
    padding: 8px 14px;
    border-radius: 50px;
    border: 1px solid rgba(255,255,255,.15);
    background: transparent;
    color: #888;
    font-size: .8rem;
    cursor: pointer;
    transition: all .15s;
    text-align: center;
}
.btdjpro-delete-btn:hover {
    border-color: #e74c3c;
    color: #e74c3c;
}

.btdjpro-loading {
    text-align: center;
    padding: 40px;
    color: #666;
    font-size: 1rem;
}
.btdjpro-empty {
    text-align: center;
    padding: 48px 20px;
    color: #555;
}
.btdjpro-empty span {
    font-size: 3rem;
    display: block;
    margin-bottom: 10px;
}

.btdjpro-dash-footer {
    margin-top: 20px;
    padding-top: 14px;
    border-top: 1px solid rgba(255,255,255,.06);
    text-align: right;
    font-size: .78rem;
    color: #555;
}

/* ---- Status pill ---- */
.btdjpro-status-pill {
    display: inline-block;
    padding: 3px 10px;
    border-radius: 50px;
    font-size: .7rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .04em;
}
.btdjpro-status-pill.open   { background: rgba(29,185,84,.2); color: #1db954; }
.btdjpro-status-pill.played { background: rgba(231,76,60,.2); color: #e74c3c; }

/* =====================================================
   FULLSCREEN MODE
===================================================== */
.btdjpro-dashboard-wrap.is-fullscreen {
    position: fixed;
    inset: 0;
    z-index: 99999;
    border-radius: 0;
    overflow-y: auto;
    padding: 32px;
}
.btdjpro-dashboard-wrap.is-fullscreen .btdjpro-requests {
    max-width: 900px;
    margin: 0 auto;
}

/* =====================================================
   RESPONSIVE – Mobile
===================================================== */
@media (max-width: 600px) {
    .btdjpro-form-card {
        padding: 24px 18px;
    }
    .btdjpro-request-item {
        flex-wrap: wrap;
    }
    .btdjpro-request-actions {
        flex-direction: row;
        width: 100%;
    }
    .btdjpro-toggle-btn,
    .btdjpro-delete-btn {
        flex: 1;
        text-align: center;
    }
    .btdjpro-dash-header {
        flex-direction: column;
        align-items: flex-start;
    }
    .btdjpro-dropdown-meta strong {
        max-width: 160px;
    }
}
