/**
 * NIBRA Contest Manager – Public Styles
 * RTL-first design for Algerian Arabic market.
 * Version: 1.0.0
 */

/* ===========================
   Reset / Base
   =========================== */
.ncm-form-wrap *,
.ncm-form-wrap *::before,
.ncm-form-wrap *::after {
    box-sizing: border-box;
}

.ncm-form-wrap {
    font-family: 'Segoe UI', Tahoma, Arial, sans-serif;
    color: #1d2327;
    max-width: 760px;
    margin: 0 auto;
    padding: 20px;
}

/* ===========================
   Competition Header
   =========================== */
.ncm-competition-title {
    font-size: 24px;
    font-weight: 700;
    margin-bottom: 8px;
    color: #1d2327;
}

.ncm-organizer,
.ncm-deadline {
    font-size: 14px;
    color: #50575e;
    margin-bottom: 4px;
}

.ncm-notice-paid {
    display: inline-block;
    background: #fff8e5;
    border: 1px solid #f0c040;
    border-radius: 4px;
    padding: 6px 12px;
    font-size: 14px;
    font-weight: 600;
    color: #996800;
    margin-bottom: 16px;
}

/* ===========================
   Form Fields
   =========================== */
.ncm-form {
    background: #fff;
    border: 1px solid #ddd;
    border-radius: 8px;
    padding: 28px;
    margin-top: 20px;
    box-shadow: 0 2px 8px rgba(0,0,0,.05);
}

.ncm-field-group {
    margin-bottom: 18px;
}

.ncm-label {
    display: block;
    font-size: 14px;
    font-weight: 600;
    margin-bottom: 6px;
    color: #1d2327;
}

.ncm-required {
    color: #c00;
    margin-inline-start: 2px;
}

.ncm-input,
.ncm-select {
    width: 100%;
    padding: 10px 14px;
    border: 1px solid #c3c4c7;
    border-radius: 4px;
    font-size: 15px;
    transition: border-color .2s, box-shadow .2s;
    background: #fafafa;
    color: #1d2327;
    direction: inherit;
}

.ncm-input:focus,
.ncm-select:focus {
    border-color: #2271b1;
    outline: none;
    box-shadow: 0 0 0 3px rgba(34,113,177,.15);
    background: #fff;
}

.ncm-field-hint {
    font-size: 12px;
    color: #787c82;
    margin-top: 4px;
}

/* Two column layout */
.ncm-two-col {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
}

@media (max-width: 600px) {
    .ncm-two-col { grid-template-columns: 1fr; }
}

/* Checkbox */
.ncm-field-checkbox label {
    display: flex;
    align-items: flex-start;
    gap: 8px;
    font-size: 14px;
    cursor: pointer;
}

.ncm-field-checkbox input[type="checkbox"] {
    flex-shrink: 0;
    margin-top: 2px;
    width: 16px;
    height: 16px;
    accent-color: #2271b1;
}

/* File input */
.ncm-file-input {
    width: 100%;
    padding: 8px;
    border: 2px dashed #c3c4c7;
    border-radius: 4px;
    background: #f6f7f7;
    cursor: pointer;
    font-size: 14px;
}

/* ===========================
   Buttons
   =========================== */
.ncm-btn {
    display: inline-block;
    padding: 12px 28px;
    border: none;
    border-radius: 4px;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    text-decoration: none;
    text-align: center;
    transition: background .2s, transform .1s;
}

.ncm-btn:active {
    transform: scale(.98);
}

.ncm-btn-primary {
    background: #2271b1;
    color: #fff;
}

.ncm-btn-primary:hover {
    background: #135e96;
    color: #fff;
}

.ncm-btn-primary:disabled {
    background: #a7aaad;
    cursor: not-allowed;
}

.ncm-submit-group {
    margin-top: 24px;
    text-align: center;
}

/* ===========================
   Messages / Alerts
   =========================== */
.ncm-messages {
    padding: 14px 18px;
    border-radius: 4px;
    margin-bottom: 16px;
    font-size: 14px;
    font-weight: 500;
}

.ncm-messages.ncm-success {
    background: #e6f7e6;
    border: 1px solid #6dde6d;
    color: #1a4a1a;
}

.ncm-messages.ncm-error {
    background: #fde8e8;
    border: 1px solid #f87171;
    color: #6b0000;
}

.ncm-error {
    color: #cc1818;
    font-size: 14px;
}

.ncm-notice {
    background: #fff8e5;
    border: 1px solid #f0c040;
    border-radius: 4px;
    padding: 12px 16px;
    font-size: 14px;
    color: #5c4300;
}

/* ===========================
   Results Table
   =========================== */
.ncm-results-wrap table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 16px;
}

.ncm-results-wrap th,
.ncm-results-wrap td {
    padding: 10px 14px;
    border: 1px solid #ddd;
    text-align: right;
    font-size: 14px;
}

.ncm-results-wrap th {
    background: #f6f7f7;
    font-weight: 600;
}

.ncm-winner-row td {
    background: #fffbea;
    font-weight: 600;
}

.ncm-winner-badge {
    background: #ffd700;
    color: #5c4300;
    padding: 2px 8px;
    border-radius: 12px;
    font-size: 11px;
    font-weight: 700;
}

/* ===========================
   Competition List
   =========================== */
.ncm-competitions-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 20px;
    margin: 20px 0;
}

.ncm-competition-card {
    background: #fff;
    border: 1px solid #ddd;
    border-radius: 8px;
    padding: 20px;
    box-shadow: 0 1px 4px rgba(0,0,0,.06);
    transition: box-shadow .2s, transform .2s;
}

.ncm-competition-card:hover {
    box-shadow: 0 4px 16px rgba(0,0,0,.1);
    transform: translateY(-2px);
}

.ncm-competition-card h3 {
    font-size: 17px;
    margin: 0 0 10px;
    color: #1d2327;
}

.ncm-competition-card .ncm-meta {
    font-size: 13px;
    color: #50575e;
}

.ncm-competition-card .ncm-apply-link {
    display: inline-block;
    margin-top: 14px;
    padding: 8px 18px;
    background: #2271b1;
    color: #fff;
    border-radius: 4px;
    text-decoration: none;
    font-size: 13px;
    font-weight: 600;
}

.ncm-competition-card .ncm-apply-link:hover {
    background: #135e96;
}
