/* ============================================================
   discs.css  –  Shared styles for all Disc Razor pages
   (Index, Create, Edit, Details, Delete)
   ============================================================ */


/* ── Page header (Index) ─────────────────────────────────── */
.discs-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 1.5rem;
    padding-bottom: 0.75rem;
    border-bottom: 2px solid #dee2e6;
}

.discs-header h1 {
    font-size: 1.75rem;
    font-weight: 700;
    color: #1a1a2e;
    margin: 0;
}

.disc-count {
    font-size: 0.85rem;
    color: #6c757d;
    font-weight: 500;
}

.disc-btn-create {
    background: linear-gradient(135deg, #667eea, #764ba2);
    color: #fff;
    border: none;
    padding: 0.45rem 1.1rem;
    border-radius: 6px;
    font-size: 0.875rem;
    font-weight: 600;
    text-decoration: none;
    transition: opacity 0.2s, transform 0.1s;
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
}

.disc-btn-create:hover {
    opacity: 0.88;
    transform: translateY(-1px);
    color: #fff;
    text-decoration: none;
}


/* ── Search Bar (Index) ──────────────────────────────────── */
.disc-search-container {
    margin-bottom: 1.5rem;
}

.disc-search-form {
    display: flex;
    gap: 0.75rem;
    width: 100%;
    max-width: 600px;
}

.disc-search-input-wrapper {
    position: relative;
    flex-grow: 1;
    display: flex;
    align-items: center;
}

.disc-search-icon {
    position: absolute;
    left: 0.9rem;
    color: #adb5bd;
    font-size: 0.9rem;
    pointer-events: none;
}

.disc-search-input {
    width: 100%;
    padding: 0.55rem 2.2rem;
    font-size: 0.9rem;
    color: #212529;
    background: #fff;
    border: 1.5px solid #dee2e6;
    border-radius: 7px;
    transition: border-color 0.2s, box-shadow 0.2s;
}

.disc-search-input:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.15);
}

.disc-clear-search-btn {
    position: absolute;
    right: 0.9rem;
    color: #adb5bd;
    font-size: 0.8rem;
    text-decoration: none;
    cursor: pointer;
    transition: color 0.15s;
}

.disc-clear-search-btn:hover {
    color: #dc3545;
    text-decoration: none;
}

.disc-btn-search {
    background: #e9ecef;
    color: #495057;
    font-size: 0.875rem;
    font-weight: 600;
    padding: 0.55rem 1.2rem;
    border: 1.5px solid #dee2e6;
    border-radius: 7px;
    cursor: pointer;
    transition: background 0.2s, color 0.2s, border-color 0.2s;
}

.disc-btn-search:hover {
    background: #667eea;
    color: #fff;
    border-color: #667eea;
}


/* ── Discs table card (Index) ────────────────────────────── */
.discs-card {
    background: #fff;
    border-radius: 10px;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.08);
    overflow: hidden;
    margin-bottom: 1.5rem;
}

.discs-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.9rem;
}

.discs-table thead {
    background: linear-gradient(135deg, #1a1a2e, #16213e);
    color: #fff;
}

.discs-table thead th {
    padding: 0.85rem 1rem;
    font-weight: 600;
    font-size: 0.8rem;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    white-space: nowrap;
    border: none;
}

.discs-table tbody tr {
    border-bottom: 1px solid #f1f3f5;
    transition: background 0.15s;
}

.discs-table tbody tr:last-child {
    border-bottom: none;
}

.discs-table tbody tr:hover {
    background: #f8f5ff;
}

.discs-table tbody tr:nth-child(even) {
    background: #fafafa;
}

.discs-table tbody tr:nth-child(even):hover {
    background: #f8f5ff;
}

.discs-table td {
    padding: 0.75rem 1rem;
    color: #343a40;
    vertical-align: middle;
}

.disc-td-record {
    font-weight: 600;
    color: #1a1a2e;
}

.disc-td-name {
    color: #212529;
}

.disc-td-number {
    text-align: center;
    font-weight: 600;
    color: #6c757d;
}

.disc-td-length {
    color: #495057;
}

.disc-td-actions {
    white-space: nowrap;
    text-align: right;
}

.disc-action-link {
    font-size: 0.8rem;
    font-weight: 600;
    padding: 0.25rem 0.6rem;
    border-radius: 5px;
    text-decoration: none;
    margin-left: 0.3rem;
    transition: opacity 0.15s, transform 0.1s;
    display: inline-block;
}

.disc-action-link:hover {
    opacity: 0.8;
    transform: translateY(-1px);
    text-decoration: none;
}

.disc-action-edit    { background: #e8f4fd; color: #1a73e8; }
.disc-action-details { background: #e8f5e9; color: #2e7d32; }
.disc-action-delete  { background: #fce4ec; color: #c62828; }


/* ── Pagination (Index) ──────────────────────────────────── */
.disc-pagination-bar {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.3rem;
    flex-wrap: wrap;
    margin-top: 0.5rem;
    margin-bottom: 1.5rem;
}

.disc-page-btn {
    min-width: 2.2rem;
    height: 2.2rem;
    padding: 0 0.5rem;
    border-radius: 6px;
    border: 1px solid #dee2e6;
    background: #fff;
    color: #495057;
    font-size: 0.85rem;
    font-weight: 500;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    transition: background 0.15s, color 0.15s, border-color 0.15s;
}

.disc-page-btn:hover {
    background: #f0eeff;
    border-color: #667eea;
    color: #667eea;
    text-decoration: none;
}

.disc-page-btn.active {
    background: linear-gradient(135deg, #667eea, #764ba2);
    border-color: transparent;
    color: #fff;
    font-weight: 700;
    pointer-events: none;
}

.disc-page-btn.disc-nav-btn {
    font-weight: 700;
    color: #667eea;
    border-color: #667eea;
    gap: 0.2rem;
    padding: 0 0.75rem;
}

.disc-page-btn.disc-nav-btn:hover {
    background: #667eea;
    color: #fff;
}

.disc-pagination-info {
    font-size: 0.82rem;
    color: #6c757d;
    text-align: center;
    margin-bottom: 0.5rem;
}


/* ── Centering Wrappers (Create, Edit, Details, Delete) ───── */
.disc-create-wrapper,
.disc-edit-wrapper,
.disc-details-wrapper {
    display: flex;
    justify-content: center;
    padding: 2rem 1rem 3rem;
}


/* ── Card Shells (Create, Edit, Details, Delete) ─────────── */
.disc-create-card,
.disc-edit-card,
.disc-card {
    width: 100%;
    max-width: 120ch;
    background: #fff;
    border-radius: 14px;
    box-shadow: 0 4px 28px rgba(0, 0, 0, 0.10);
    overflow: hidden;
}


/* ── Card Headers ────────────────────────────────────────── */
.disc-create-card-header,
.disc-edit-card-header,
.disc-card-header {
    padding: 2rem 2.5rem;
    display: flex;
    align-items: center;
    gap: 1.5rem;
}

/* Default dark gradient header */
.disc-create-card-header,
.disc-edit-card-header,
.disc-card-header:not(.danger) {
    background: linear-gradient(135deg, #0f0c29, #1a1a2e, #16213e);
    border-bottom: 2px solid rgba(102, 126, 234, 0.4);
}

/* Danger header variant for Delete */
.disc-card-header.danger {
    background: linear-gradient(135deg, #2b0b0b, #1f0505, #140202);
    border-bottom: 2px solid rgba(220, 53, 69, 0.4);
}


/* ── Avatar Bubbles ──────────────────────────────────────── */
.disc-create-avatar,
.disc-edit-avatar,
.disc-avatar {
    width: 72px;
    height: 72px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.75rem;
    font-weight: 800;
    color: #fff;
    flex-shrink: 0;
}

/* Default avatar gradient */
.disc-create-avatar,
.disc-edit-avatar,
.disc-avatar:not(.danger) {
    background: linear-gradient(135deg, #667eea, #764ba2);
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.4);
}

/* Danger avatar variant for Delete */
.disc-avatar.danger {
    background: linear-gradient(135deg, #dc3545, #bd2130);
    box-shadow: 0 0 0 3px rgba(220, 53, 69, 0.4);
}


/* ── Header Texts ────────────────────────────────────────── */
.disc-create-header-text h1,
.disc-edit-header-text h1,
.disc-header-text h1 {
    margin: 0 0 0.15rem;
    font-size: 1.6rem;
    font-weight: 700;
    color: #fff;
    line-height: 1.2;
}

.disc-create-subtitle,
.disc-edit-subtitle {
    font-size: 0.875rem;
    color: rgba(255, 255, 255, 0.5);
}

.disc-subtitle {
    font-size: 0.875rem;
    color: rgba(255, 255, 255, 0.55);
}

.disc-subtitle.delete-warning {
    color: #f8d7da;
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 0.25rem;
}


/* ── Card Bodies ─────────────────────────────────────────── */
.disc-create-card-body,
.disc-edit-card-body,
.disc-card-body {
    padding: 2rem 2.5rem;
}


/* ── Validation Summary ──────────────────────────────────── */
.disc-validation-summary {
    background: #fff5f5;
    border: 1px solid #feb2b2;
    border-radius: 8px;
    padding: 0.85rem 1rem;
    margin-bottom: 1.5rem;
    color: #c53030;
    font-size: 0.875rem;
}


/* ── Form Field Groups (Create, Edit) ────────────────────── */
.disc-field-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.25rem;
    margin-bottom: 1.25rem;
}

.disc-field-row.disc-full-width {
    grid-template-columns: 1fr;
}

.disc-field-group {
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
}

.disc-field-label {
    font-size: 0.78rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.07em;
    color: #6c757d;
}

.disc-field-input {
    padding: 0.65rem 0.9rem;
    border: 1.5px solid #dee2e6;
    border-radius: 8px;
    font-size: 0.95rem;
    color: #212529;
    background: #fff;
    transition: border-color 0.2s, box-shadow 0.2s;
    width: 100%;
    box-sizing: border-box;
}

.disc-field-input:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.18);
}

.disc-field-error {
    font-size: 0.8rem;
    color: #e74c3c;
    margin-top: 0.1rem;
}

.disc-field-divider {
    border: none;
    border-top: 1px solid #f1f3f5;
    margin: 0.25rem 0 1.5rem;
}

.disc-field-section-title {
    font-size: 0.72rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: #adb5bd;
    margin-bottom: 1rem;
}


/* ── Detail Grid (Details, Delete) ───────────────────────── */
.disc-detail-grid {
    display: grid;
    grid-template-columns: 180px 1fr;
    gap: 0;
}

.disc-detail-row {
    display: contents;
}

.disc-detail-label,
.disc-detail-value {
    padding: 0.85rem 0;
    border-bottom: 1px solid #f1f3f5;
}

.disc-detail-row:last-child .disc-detail-label,
.disc-detail-row:last-child .disc-detail-value {
    border-bottom: none;
}

.disc-detail-label {
    font-size: 0.78rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.07em;
    color: #6c757d;
    padding-right: 1.5rem;
    display: flex;
    align-items: flex-start;
    padding-top: 1rem;
}

.disc-detail-value {
    font-size: 0.95rem;
    color: #212529;
    line-height: 1.6;
}

.disc-detail-value.empty {
    color: #adb5bd;
    font-style: italic;
}


/* ── Delete Prompt Banner ────────────────────────────────── */
.disc-delete-prompt-banner {
    background-color: #fff5f5;
    border-left: 4px solid #e53e3e;
    color: #c53030;
    padding: 1rem 1.25rem;
    border-radius: 6px;
    margin-bottom: 2rem;
    font-size: 0.95rem;
    font-weight: 600;
}


/* ── Action Footers ──────────────────────────────────────── */
.disc-create-card-footer,
.disc-edit-card-footer,
.disc-card-footer {
    padding: 1.25rem 2.5rem;
    background: #f8f9fa;
    border-top: 1px solid #e9ecef;
    display: flex;
    gap: 0.75rem;
    align-items: center;
    flex-wrap: wrap;
}

.disc-card-footer form {
    display: flex;
    gap: 0.75rem;
    align-items: center;
    flex-wrap: wrap;
    margin: 0;
}


/* ── Action Buttons ──────────────────────────────────────── */
.disc-btn-action {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    padding: 0.5rem 1.2rem;
    border-radius: 7px;
    font-size: 0.875rem;
    font-weight: 600;
    text-decoration: none;
    transition: opacity 0.2s, transform 0.15s, box-shadow 0.2s;
    cursor: pointer;
    border: none;
}

.disc-btn-action:hover {
    opacity: 0.88;
    transform: translateY(-1px);
    text-decoration: none;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.disc-btn-create-submit,
.disc-btn-save,
.disc-btn-edit {
    background: linear-gradient(135deg, #667eea, #764ba2);
    color: #fff;
}

.disc-btn-create-submit:hover,
.disc-btn-save:hover,
.disc-btn-edit:hover {
    color: #fff;
}

.disc-btn-delete {
    background: linear-gradient(135deg, #dc3545, #c82333);
    color: #fff;
}

.disc-btn-delete:hover {
    color: #fff;
}

.disc-btn-back {
    background: #e9ecef;
    color: #495057;
}

.disc-btn-back:hover {
    color: #212529;
}


/* ── Responsive breakpoints ──────────────────────────────── */
@media (max-width: 600px) {
    .disc-create-wrapper,
    .disc-edit-wrapper,
    .disc-details-wrapper {
        padding: 1rem 0.5rem 2rem;
    }

    .disc-create-card-header,
    .disc-edit-card-header,
    .disc-card-header {
        padding: 1.5rem 1.25rem;
        flex-direction: column;
        align-items: flex-start;
        gap: 1rem;
    }

    .disc-create-card-body,
    .disc-edit-card-body,
    .disc-card-body {
        padding: 1.25rem;
    }

    .disc-field-row {
        grid-template-columns: 1fr;
        gap: 1rem;
    }

    .disc-detail-grid {
        grid-template-columns: 1fr;
    }

    .disc-detail-label {
        padding-bottom: 0.1rem;
        border-bottom: none;
    }

    .disc-detail-value {
        padding-top: 0;
    }

    .disc-create-card-footer,
    .disc-edit-card-footer,
    .disc-card-footer {
        padding: 1rem 1.25rem;
    }
}

@media (min-width: 601px) and (max-width: 900px) {
    .disc-create-card-header,
    .disc-edit-card-header,
    .disc-card-header {
        padding: 1.75rem;
    }

    .disc-create-card-body,
    .disc-edit-card-body,
    .disc-card-body {
        padding: 1.75rem;
    }

    .disc-detail-grid {
        grid-template-columns: 140px 1fr;
    }

    .disc-create-card-footer,
    .disc-edit-card-footer,
    .disc-card-footer {
        padding: 1.25rem 1.75rem;
    }
}
