/* ===== SHARED ===== */
* {
    box-sizing: border-box;
}

body {
    font-family: "Segoe UI", Tahoma, Geneva, Verdana, sans-serif;
    background: #f8fafc;
    color: #1f2937;
    display: flex;
    align-items: center;
    flex-direction: column;
    padding: 0;
    margin: 0;
}

/* ===== headers ===== */
h1 {
    font-size: 3rem;
    font-weight: 700;
    margin-bottom: 1rem;
    color: #111827;
}

h2 {
    font-size: 2.4rem;
    margin-bottom: 1rem;
}

/* ===== card section style ===== */
.page-card {
    background: white;
    padding: 2rem;
    border-radius: 16px;
    box-shadow:
        0 1px 3px rgba(0,0,0,.06),
        0 8px 24px rgba(0,0,0,.05);
    margin-top: 1.5rem;
    max-width: 1100px;
}

/* ===== links ===== */
a {
    text-decoration: none;
    color: #2563eb;
    transition: .2s;
}

a:hover {
    color: #1d4ed8;
}

/* ===== buttons ===== */
.btn-primary,
button[type="submit"] {
    border: none;
    border-radius: 10px;
    padding: .65rem 1.25rem;
    background: #2563eb;
    transition: .2s;
    font-weight: 600;
    font-size: 1rem;
    color: white;
    cursor: pointer;
}

.btn-primary:hover,
button[type="submit"]:hover {
    background: #0f2ea8;
}

.btn-secondary {
}

/* ===== HEADER ===== */
header {
    display: flex;
    flex-direction: row;
    justify-content: space-around;
    align-items: center;
    background: white;
    border-bottom: 1px solid #e5e7eb;
    box-shadow: 0 1px 2px rgba(0,0,0,.04);
    font-size: 1.5rem;
    font-weight: 700;
    align-self: stretch;
}

nav {
    display: flex;
    flex-direction: row;
    justify-content: space-around;
    align-items: center;
    min-width: 10%;
}
nav a {
    color:#777777
}

/* ===== FOOTER ===== */
footer {
    display: flex;
    flex-direction: row;
    justify-content: left;
    align-items: center;
    margin-top: 4rem;
    color: #6b7280;
}

/* ===== MAIN LIST ===== */
/* ===== filter bar ===== */
.filter-bar {
    display: flex;
    gap: 1rem;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    margin-bottom: 1.5rem;
}

.filter-bar .form-control,
.filter-bar .form-select {
    width: auto;
    min-width: 220px;
}

/* ===== table ===== */
.movie-list-table {
    background: white;
    border-radius: 12px;
    overflow: hidden;
}

.movie-list-table thead {
    background: #f3f4f6;
}

.movie-list-table th {
    font-weight: 700;
    color: #111827;
    border-bottom: 2px solid #e5e7eb;
}

.movie-list-table td,
.movie-list-table th {
    padding: 1rem;
    vertical-align: middle;
}

.movie-list-table tbody tr {
    transition: .15s ease;
}

.movie-list-table tbody tr:hover {
    background: #f8fafc;
}

/* ===== actions ===== */
/* (to unify button and link visuals) */
a.list-action, .list-action, .btn-secondary {
    display: inline-block;
    background: #f3f4f6;
    text-decoration: none;
    font: inherit;
    border-radius: 10px;
    border: none;
    border-radius: 10px;
    padding: .65rem 1.25rem;
    cursor: pointer;
    font-weight: 400;
    font-size: 1rem;
    color: #2563eb;
}

a.list-action:hover, .list-action:hover, .btn-secondary:hover {
    background: #eee;
    border-color: #ddd;
    color: #1d4ed8;
}

#list-action-delete:hover {
    background: #d33;
    border-color: #b11;
    color: white;
}

/* ===== EDIT/CREATE PAGE ===== */
/* ===== form ===== */
.edit-movie-form {
    max-width: 600px;
    margin-bottom: 1.25rem;
    display: flex;
    flex-direction: column;
    justify-content: space-around;
}

label {
    font-weight: 600;
    margin-bottom: .5rem;
}

.edit-movie-form div {
    display: flex;
    flex-direction: row;
    justify-content: space-between;
    align-items: center;
    min-width: 320px;
}


/* ===== form controls ===== */
.edit-input-field input, input.edit-input-field, select {
    border: 1px solid #d1d5db;
    border-radius: 10px;
    padding: .75rem 1rem;
    transition: all .2s ease;
    text-align: right;
}

.edit-input-field input:focus, input.edit-input-field:focus {
    border-color: #2563eb;
    box-shadow: 0 0 0 5px rgba(37, 99, 235, .15);
}

td.edit-input-field {
    text-align: right;
}

/* ===== validation ===== */
.validation-error-icon {
    cursor: pointer;
}

#validation-error-summary {
    background: #fef2f2;
    border-radius: 10px;
    color: #dc2626 !important;
    font-size: .95rem;
    margin-top: .4rem;
    display: block;
    padding: 0.5rem 1rem;
}
