/* =============================================================
   File: public/css/datesheet-frontend.css
   Used by: datesheets-page.blade.php
============================================================= */

/* ── Hero ── */
.ds-hero-section {
    background: linear-gradient(135deg, #1a3c6e 0%, #2563eb 100%);
    padding: 4rem 0 3rem;
    color: #fff;
}

.ds-hero-content { max-width: 620px; }

.ds-hero-section .global-h1 { color: #fff; margin-bottom: .75rem; }
.ds-hero-section .global-p  { color: rgba(255,255,255,.85); }
.ds-hero-section .section-badge {
    background: rgba(255,255,255,.15);
    color: #fff;
    border-color: rgba(255,255,255,.25);
}

/* ── Main section ── */
.ds-main-section { padding-top: 2.5rem; }

/* ── Filter card ── */
.ds-filter-card {
    background: #fff;
    border-radius: 14px;
    padding: 1.5rem;
    box-shadow: 0 4px 20px rgba(0,0,0,.07);
    margin-bottom: 1.5rem;
    border: 1px solid #e5e7eb;
}

.ds-filter-grid {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr 2fr;
    gap: 1rem;
    align-items: end;
}

@media (max-width: 900px) { .ds-filter-grid { grid-template-columns: 1fr 1fr; } }
@media (max-width: 560px) { .ds-filter-grid { grid-template-columns: 1fr; } }

.ds-filter-group label {
    display: block;
    font-size: .78rem;
    font-weight: 600;
    color: #6b7280;
    text-transform: uppercase;
    letter-spacing: .05em;
    margin-bottom: .4rem;
}

.ds-filter-group select,
.ds-filter-group input[type="text"] {
    width: 100%;
    border: 1px solid #d1d5db;
    border-radius: 8px;
    padding: .55rem .8rem;
    font-size: .9rem;
    color: #111827;
    background: #fff;
    appearance: none;
    -webkit-appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' fill='none' stroke='%236b7280' stroke-width='2' viewBox='0 0 24 24'%3E%3Cpolyline points='6 9 12 15 18 9'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right .75rem center;
    padding-right: 2rem;
    transition: border-color .2s;
}

.ds-filter-group input[type="text"] {
    background-image: none;
    padding-right: .8rem;
}

.ds-filter-group select:focus,
.ds-filter-group input:focus {
    outline: none;
    border-color: #1a3c6e;
    box-shadow: 0 0 0 3px rgba(26,60,110,.1);
}

.ds-search-group .ds-search-wrap {
    display: flex;
    gap: .5rem;
    align-items: center;
}

.ds-search-group .ds-search-wrap input { flex: 1; }

.ds-search-btn { padding: .55rem 1.1rem !important; white-space: nowrap; }
.ds-reset-btn  { padding: .55rem 1rem  !important; white-space: nowrap; }

/* ── Results card ── */
.ds-results-card {
    background: #fff;
    border-radius: 14px;
    box-shadow: 0 4px 20px rgba(0,0,0,.07);
    border: 1px solid #e5e7eb;
    overflow: hidden;
}

.ds-results-header {
    padding: 1rem 1.5rem;
    border-bottom: 1px solid #f3f4f6;
}

.ds-results-count {
    font-size: .87rem;
    color: #6b7280;
    margin: 0;
}

/* ── Table ── */
.ds-table-wrapper { overflow-x: auto; }

.ds-table {
    width: 100%;
    border-collapse: collapse;
    font-size: .9rem;
}

.ds-table thead tr {
    background: #f8faff;
    border-bottom: 2px solid #e5e7eb;
}

.ds-table thead th {
    padding: .85rem 1.25rem;
    text-align: left;
    font-size: .72rem;
    text-transform: uppercase;
    letter-spacing: .07em;
    color: #6b7280;
    font-weight: 700;
    white-space: nowrap;
}

.ds-table tbody tr {
    border-bottom: 1px solid #f3f4f6;
    transition: background .15s;
}

.ds-table tbody tr:hover { background: #f8faff; }
.ds-table tbody tr:last-child { border-bottom: none; }

.ds-table tbody td {
    padding: 1rem 1.25rem;
    color: #111827;
    vertical-align: middle;
}

/* Class cell */
.ds-class-name   { font-weight: 600; color: #111827; line-height: 1.3; }
.ds-course-badge { font-size: .74rem; color: #6b7280; margin-top: .2rem; }

/* Exam type badge */
.ds-exam-type-badge {
    display: inline-block;
    padding: 3px 10px;
    border-radius: 20px;
    font-size: .75rem;
    font-weight: 600;
    white-space: nowrap;
}

.ds-et-theory               { background: #eff6ff; color: #1d4ed8; }
.ds-et-practical            { background: #fef3c7; color: #92400e; }
.ds-et-theory--practical    { background: #d1fae5; color: #065f46; }

/* ── Action icons ── */
.ds-action-icons { display: flex; gap: .5rem; align-items: center; }

.ds-icon-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 38px;
    height: 38px;
    border-radius: 8px;
    border: 1px solid #e5e7eb;
    background: #fff;
    cursor: pointer;
    transition: all .2s;
    text-decoration: none;
    color: #374151;
}

.ds-icon-btn:hover { transform: translateY(-1px); box-shadow: 0 3px 10px rgba(0,0,0,.1); }

.ds-icon-download:hover { background: #eff6ff; border-color: #bfdbfe; color: #1d4ed8; }
.ds-icon-email:hover    { background: #f0fdf4; border-color: #86efac; color: #16a34a; }

/* ── Empty state ── */
.ds-empty-state {
    padding: 4rem 2rem;
    text-align: center;
    color: #6b7280;
}

.ds-empty-icon { font-size: 3rem; margin-bottom: 1rem; }
.ds-empty-state h3 { color: #111827; margin-bottom: .5rem; font-size: 1.1rem; }
.ds-empty-state p  { margin-bottom: 1.5rem; }

/* ── Email Modal ── */
.ds-modal-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,.5);
    z-index: 10000;
    align-items: center;
    justify-content: center;
    padding: 1rem;
    backdrop-filter: blur(3px);
}

.ds-modal-overlay.open { display: flex; }

.ds-modal {
    background: #fff;
    border-radius: 16px;
    width: 100%;
    max-width: 420px;
    box-shadow: 0 20px 60px rgba(0,0,0,.2);
    overflow: hidden;
    animation: ds-modal-in .2s ease;
}

@keyframes ds-modal-in {
    from { opacity: 0; transform: scale(.95) translateY(10px); }
    to   { opacity: 1; transform: scale(1) translateY(0); }
}

.ds-modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1.25rem 1.5rem 1rem;
    border-bottom: 1px solid #f3f4f6;
}

.ds-modal-title  { font-size: 1rem; font-weight: 700; color: #111827; margin: 0; }

.ds-modal-close {
    background: none;
    border: none;
    font-size: 1.4rem;
    line-height: 1;
    color: #9ca3af;
    cursor: pointer;
    padding: 0 4px;
}

.ds-modal-close:hover { color: #374151; }

.ds-modal-body { padding: 1.25rem 1.5rem; }

.ds-modal-subtitle {
    font-size: .82rem;
    color: #6b7280;
    margin: 0 0 1rem;
    padding: .6rem .8rem;
    background: #f9fafb;
    border-radius: 6px;
    border-left: 3px solid #1a3c6e;
}

.ds-modal-field { margin-bottom: 1rem; }

.ds-modal-field label {
    display: block;
    font-size: .8rem;
    font-weight: 600;
    color: #374151;
    margin-bottom: .4rem;
}

.ds-modal-field input {
    width: 100%;
    border: 1px solid #d1d5db;
    border-radius: 8px;
    padding: .6rem .85rem;
    font-size: .9rem;
    color: #111827;
    transition: border-color .2s;
}

.ds-modal-field input:focus {
    outline: none;
    border-color: #1a3c6e;
    box-shadow: 0 0 0 3px rgba(26,60,110,.1);
}

.ds-modal-msg {
    padding: .65rem .85rem;
    border-radius: 7px;
    font-size: .83rem;
    margin-bottom: .75rem;
}

.ds-msg-success { background: #f0fdf4; color: #166534; border: 1px solid #86efac; }
.ds-msg-error   { background: #fef2f2; color: #991b1b; border: 1px solid #fca5a5; }

.ds-modal-footer {
    display: flex;
    justify-content: flex-end;
    gap: .75rem;
    padding: 1rem 1.5rem 1.25rem;
    border-top: 1px solid #f3f4f6;
}