/* ==========================================================================
   Nominations — Mobile-First Responsive Styles
   ========================================================================== */

/* --- CSS Custom Properties (overridden inline per event branding) --- */
:root {
    --nom-primary: #007bff;
    --nom-secondary: #2980B9;
    --nom-accent: #FF9311;
    --nom-success: #27ae60;
    --nom-danger: #e74c3c;
    --nom-gray-light: #f8f9fa;
    --nom-gray-mid: #dee2e6;
    --nom-gray-dark: #495057;
    --nom-radius: 8px;
    --nom-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

/* --- Wrapper --- */
.nominations-wrapper {
    max-width: 720px;
    margin: 0 auto;
    padding: 16px;
}

/* --- Logo --- */
.nom-logo-container {
    text-align: center;
    margin-bottom: 24px;
}

.nom-logo {
    max-height: 100px;
    width: auto;
    max-width: 100%;
}

/* --- Page Header --- */
.nom-page-header {
    margin-bottom: 24px;
}

.nom-page-header h1 {
    font-size: 24px;
    font-weight: 700;
    color: var(--nom-primary);
    margin-bottom: 8px;
}

.nom-page-header p {
    font-size: 16px;
    color: var(--nom-gray-dark);
    line-height: 1.5;
}

/* Landing: event.description (linebreaksbr); style via this class only */
.nom-page-header .nom-landing-description {
    font-size: 18px;
    color: var(--nom-gray-dark);
    line-height: 1.65;
    margin: 0;
}

/* --- Deadline Banner --- */
.nom-deadline {
    background: var(--nom-gray-light);
    border-left: 4px solid var(--nom-accent);
    padding: 12px 16px;
    border-radius: var(--nom-radius);
    margin-bottom: 24px;
    font-size: 16px;
}

.nom-deadline strong {
    color: var(--nom-primary);
}

/* --- Closed Banner --- */
.nom-closed-banner {
    background: #fdf2f2;
    border: 1px solid var(--nom-danger);
    border-radius: var(--nom-radius);
    padding: 16px;
    text-align: center;
    margin-bottom: 24px;
}

.nom-closed-banner p {
    color: var(--nom-danger);
    font-weight: 600;
    margin: 0;
    font-size: 16px;
}

/* --- Buttons --- */
.nom-btn {
    display: inline-block;
    padding: 14px 28px;
    font-size: 16px;
    font-weight: 600;
    text-align: center;
    text-decoration: none;
    border: none;
    border-radius: var(--nom-radius);
    cursor: pointer;
    min-width: 44px;
    min-height: 44px;
    transition: background-color 0.2s, transform 0.1s;
    -webkit-tap-highlight-color: transparent;
}

.nom-btn:active {
    transform: scale(0.98);
}

.nom-btn-primary {
    background-color: var(--nom-primary);
    color: #fff;
}

.nom-btn-primary:hover {
    background-color: var(--nom-secondary);
    color: #fff;
    text-decoration: none;
}

.nom-btn-accent {
    background-color: var(--nom-accent);
    color: #fff;
}

.nom-btn-accent:hover {
    opacity: 0.9;
    color: #fff;
    text-decoration: none;
}

.nom-btn-outline {
    background: transparent;
    border: 2px solid var(--nom-primary);
    color: var(--nom-primary);
}

.nom-btn-outline:hover {
    background: var(--nom-primary);
    color: #fff;
    text-decoration: none;
}

.nom-btn-success {
    background-color: var(--nom-success);
    color: #fff;
}

.nom-btn-success:hover {
    opacity: 0.9;
    color: #fff;
    text-decoration: none;
}

.nom-btn-danger {
    background-color: var(--nom-danger);
    color: #fff;
}

.nom-btn-block {
    display: block;
    width: 100%;
}

.nom-btn-sm {
    padding: 8px 16px;
    font-size: 14px;
    min-height: 36px;
}

/* --- Cards --- */
.nom-card {
    background: #fff;
    border: 1px solid var(--nom-gray-mid);
    border-radius: var(--nom-radius);
    box-shadow: var(--nom-shadow);
    padding: 16px;
    margin-bottom: 16px;
}

.nom-card-header {
    background: var(--nom-primary);
    color: #fff;
    padding: 12px 16px;
    border-radius: var(--nom-radius) var(--nom-radius) 0 0;
    margin: -16px -16px 16px -16px;
    font-size: 16px;
    font-weight: 600;
}

/* --- Position Block --- */
.nom-position {
    margin-bottom: 24px;
    border: 1px solid var(--nom-gray-mid);
    border-radius: var(--nom-radius);
}

.nom-position-header {
    background: var(--nom-primary);
    color: #fff;
    padding: 12px 16px;
}

.nom-position-header h3 {
    margin: 0;
    font-size: 18px;
    font-weight: 600;
}

.nom-position-header p {
    margin: 4px 0 0;
    font-size: 14px;
    opacity: 0.85;
}

.nom-position-body {
    padding: 16px;
}

.nom-position-preamble {
    font-size: 14px;
    color: var(--nom-gray-dark);
    margin-bottom: 12px;
    font-style: italic;
}

/* --- Search Input --- */
.nom-search-container {
    position: relative;
    margin-bottom: 12px;
}

.nom-search-input {
    width: 100%;
    padding: 12px 16px;
    font-size: 16px; /* Prevents iOS zoom */
    border: 2px solid var(--nom-gray-mid);
    border-radius: var(--nom-radius);
    outline: none;
    box-sizing: border-box;
    -webkit-appearance: none;
}

.nom-search-input:focus {
    border-color: var(--nom-secondary);
    box-shadow: 0 0 0 3px rgba(41, 128, 185, 0.15);
}

.nom-search-input::placeholder {
    color: #adb5bd;
}

/* --- Search Dropdown --- */
.nom-search-dropdown {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: #fff;
    border: 1px solid var(--nom-gray-mid);
    border-top: none;
    border-radius: 0 0 var(--nom-radius) var(--nom-radius);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    z-index: 1000;
    max-height: 240px;
    overflow-y: auto;
    display: none;
}

.nom-search-dropdown.active {
    display: block;
}

.nom-search-item {
    padding: 12px 16px;
    cursor: pointer;
    font-size: 15px;
    border-bottom: 1px solid var(--nom-gray-light);
    min-height: 44px;
    display: flex;
    align-items: center;
}

.nom-search-item:last-child {
    border-bottom: none;
}

.nom-search-item:hover,
.nom-search-item.highlighted {
    background: var(--nom-gray-light);
}

.nom-search-item-name {
    font-weight: 600;
}

.nom-search-item-disambiguator {
    font-size: 13px;
    color: var(--nom-gray-dark);
    margin-left: 8px;
}

.nom-search-no-results {
    padding: 12px 16px;
    color: var(--nom-gray-dark);
    font-style: italic;
    font-size: 14px;
}

/* --- Selected Nominee Cards --- */
.nom-selected-nominees {
    margin-top: 12px;
}

.nom-nominee-card {
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: var(--nom-gray-light);
    border: 1px solid var(--nom-gray-mid);
    border-radius: var(--nom-radius);
    padding: 10px 14px;
    margin-bottom: 8px;
    min-height: 44px;
}

.nom-nominee-card-name {
    font-weight: 600;
    font-size: 15px;
}

.nom-nominee-card-disambiguator {
    font-size: 13px;
    color: var(--nom-gray-dark);
}

.nom-nominee-remove {
    background: var(--nom-danger);
    color: #fff;
    border: none;
    border-radius: 50%;
    width: 28px;
    height: 28px;
    font-size: 16px;
    line-height: 28px;
    text-align: center;
    cursor: pointer;
    flex-shrink: 0;
    min-width: 44px;
    min-height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0;
}

.nom-nominee-remove:hover {
    opacity: 0.8;
}

/* --- Write-in Fields --- */
.nom-writein-section {
    margin-top: 16px;
    padding-top: 16px;
    border-top: 1px dashed var(--nom-gray-mid);
}

.nom-writein-section h4 {
    font-size: 15px;
    font-weight: 600;
    margin-bottom: 8px;
    color: var(--nom-gray-dark);
}

.nom-writein-row {
    display: flex;
    gap: 12px;
    margin-bottom: 8px;
}

.nom-writein-row input {
    flex: 1;
    padding: 10px 12px;
    font-size: 16px;
    border: 2px solid var(--nom-gray-mid);
    border-radius: var(--nom-radius);
    outline: none;
    box-sizing: border-box;
    -webkit-appearance: none;
}

.nom-writein-row input:focus {
    border-color: var(--nom-secondary);
}

/* --- Add Another Button --- */
.nom-add-another {
    margin-top: 8px;
}

/* --- Review Cards --- */
.nom-review-card {
    background: #fff;
    border: 1px solid var(--nom-gray-mid);
    border-radius: var(--nom-radius);
    padding: 16px;
    margin-bottom: 12px;
    display: flex;
    align-items: center;
    gap: 12px;
}

.nom-review-card-icon {
    width: 40px;
    height: 40px;
    background: var(--nom-secondary);
    color: #fff;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    flex-shrink: 0;
}

.nom-review-card-details {
    flex: 1;
}

.nom-review-card-position {
    font-size: 13px;
    color: var(--nom-gray-dark);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 2px;
}

.nom-review-card-name {
    font-size: 16px;
    font-weight: 600;
    color: var(--nom-primary);
}

.nom-review-card-writein {
    font-size: 12px;
    color: var(--nom-accent);
    font-weight: 600;
}

/* Review card variants */
.nom-review-card-existing {
    border-left: 3px solid var(--nom-secondary);
    opacity: 0.85;
}

.nom-review-card-new {
    border-left: 3px solid var(--nom-success);
}

.nom-review-card-icon-existing {
    background: var(--nom-secondary);
}

.nom-review-card-status {
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-top: 2px;
    color: var(--nom-secondary);
}

.nom-review-card-status-new {
    color: var(--nom-success);
}

.nom-review-card-withdrawal {
    border-left: 3px solid var(--nom-danger);
    opacity: 0.75;
    background: #fdf2f2;
}

.nom-review-card-icon-withdrawal {
    background: var(--nom-danger);
}

.nom-review-card-status-withdrawal {
    color: var(--nom-danger);
}

/* Withdrawn nominee card on form page */
.nom-nominee-card-withdrawn {
    border-left: 3px solid var(--nom-danger);
    opacity: 0.7;
    background: #fdf2f2;
}

/* Review sections */
.nom-review-section {
    margin-bottom: 24px;
}

.nom-review-section-title {
    font-size: 16px;
    font-weight: 600;
    color: var(--nom-primary);
    margin-bottom: 12px;
    padding-bottom: 8px;
    border-bottom: 1px solid var(--nom-gray-mid);
}

/* --- Confirmation --- */
.nom-confirmation {
    text-align: center;
    padding: 24px 0;
}

.nom-confirmation-icon {
    width: 80px;
    height: 80px;
    background: var(--nom-success);
    color: #fff;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 40px;
    margin: 0 auto 24px;
}

.nom-confirmation h2 {
    font-size: 24px;
    font-weight: 700;
    color: var(--nom-primary);
    margin-bottom: 8px;
}

.nom-confirmation p {
    font-size: 16px;
    color: var(--nom-gray-dark);
    margin-bottom: 16px;
}

.nom-confirmation-count {
    font-size: 48px;
    font-weight: 700;
    color: var(--nom-primary);
    line-height: 1;
    margin-bottom: 4px;
}

.nom-confirmation-label {
    font-size: 14px;
    color: var(--nom-gray-dark);
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 24px;
}

/* --- Support Block --- */
.nom-support {
    text-align: center;
    margin-top: 32px;
    padding-top: 16px;
    border-top: 1px solid var(--nom-gray-mid);
}

.nom-support-title {
    font-weight: 600;
    font-size: 14px;
    color: var(--nom-gray-dark);
    margin-bottom: 4px;
}

.nom-support a {
    color: var(--nom-secondary);
    text-decoration: none;
}

.nom-support a:hover {
    text-decoration: underline;
}

/* --- Instructions Content --- */
.nom-instructions-content {
    font-size: 18px;
    line-height: 1.65;
    color: #333;
    margin-bottom: 24px;
}

.nom-instructions-content p {
    margin-bottom: 12px;
}

/* --- Auth Section --- */
.nom-auth-section {
    text-align: center;
    padding: 24px 0;
}

.nom-auth-section p {
    font-size: 16px;
    color: var(--nom-gray-dark);
    margin-bottom: 16px;
}

.nom-auth-status {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 12px 20px;
    border-radius: var(--nom-radius);
    font-size: 15px;
    font-weight: 600;
    margin-bottom: 16px;
}

.nom-auth-status.authenticated {
    background: #d4edda;
    color: #155724;
}

.nom-auth-status.not-authenticated {
    background: #fff3cd;
    color: #856404;
}

/* --- Button Row --- */
.nom-btn-row {
    display: flex;
    gap: 12px;
    margin-top: 24px;
    flex-wrap: wrap;
}

.nom-btn-row .nom-btn {
    flex: 1;
    min-width: 140px;
}

/* --- Existing Nomination Cards (inline with new selections) --- */
.nom-nominee-card-existing {
    border-left: 3px solid var(--nom-secondary);
}

.nom-nominee-card-status {
    font-size: 11px;
    color: var(--nom-secondary);
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-top: 2px;
}

.nom-existing-badges {
    display: flex;
    flex-wrap: wrap;
    gap: 4px;
}

/* --- Messages / Alerts --- */
.nom-messages {
    margin-bottom: 16px;
}

.nom-alert {
    padding: 12px 16px;
    border-radius: var(--nom-radius);
    margin-bottom: 8px;
    font-size: 14px;
    font-weight: 500;
}

.nom-alert-error {
    background: #fdf2f2;
    border: 1px solid var(--nom-danger);
    color: #721c24;
}

.nom-alert-warning {
    background: #fff3cd;
    border: 1px solid #ffc107;
    color: #856404;
}

.nom-alert-success {
    background: #d4edda;
    border: 1px solid var(--nom-success);
    color: #155724;
}

.nom-alert-info {
    background: #d1ecf1;
    border: 1px solid #17a2b8;
    color: #0c5460;
}

/* --- Modal Overlay --- */
.nom-modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
}

.nom-modal {
    background: #fff;
    border-radius: 12px;
    padding: 24px;
    max-width: 400px;
    width: 90%;
    margin: auto;
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.2);
}

.nom-modal-title {
    margin: 0 0 12px;
    font-size: 20px;
    color: var(--nom-primary);
}

.nom-modal-text {
    margin: 0 0 20px;
    color: var(--nom-gray-dark);
    font-size: 15px;
    line-height: 1.5;
}

.nom-modal-buttons {
    display: flex;
    gap: 12px;
}

.nom-modal-buttons .nom-btn {
    flex: 1;
}

.nom-btn-danger {
    background: var(--nom-danger);
    color: #fff;
    border: none;
}

.nom-btn-danger:hover {
    background: #c0392b;
}

/* --- Responsive: Tablet+ --- */
@media (min-width: 576px) {
    .nominations-wrapper {
        padding: 24px;
    }

    .nom-logo {
        max-height: 100px;
    }

    .nom-page-header h1 {
        font-size: 28px;
    }

    .nom-btn-row {
        justify-content: center;
    }

    .nom-btn-row .nom-btn {
        flex: 0 1 auto;
    }
}

/* --- Responsive: Desktop --- */
@media (min-width: 768px) {
    .nominations-wrapper {
        padding: 32px;
    }

    .nom-page-header h1 {
        font-size: 32px;
    }

    .nom-writein-row {
        max-width: 500px;
    }
}
