/* ============================================================
   LINKS
============================================================ */

.category-link {
    color: #2a6df4;
    cursor: pointer;
    text-decoration: underline;
}

.category-link:hover {
    opacity: 0.8;
}


/* ============================================================
   TABLE LAYOUT
============================================================ */

/* General table structure */
.admin-table {
    table-layout: fixed;
    width: 100%;
}

/* Label column */
.col-label {
    width: 25%;
}

/* Description column (main content area) */
.col-description {
    width: 60%;
    white-space: normal;
}

/* Display order column (header) */
th.col-order {
    width: 120px;
    text-align: center;
}

/* Display order column (cells) */
td.col-order {
    text-align: center;
    white-space: nowrap;
    font-weight: 500;
    color: #555;
}


/* ============================================================
   MODAL LAYOUT
============================================================ */

/* Modal overlay */
.modal {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.35);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
}

/* Modal container */
.modal-content {
    background: #fff;
    padding: 24px 28px;
    border-radius: 10px;
    width: 480px;
    max-width: 90%;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.15);
    line-height: 1.4;
}

/* Modal title */
.modal-content h2 {
    margin-bottom: 20px;
}


/* ============================================================
   FORM STRUCTURE
============================================================ */

/* Form groups */
.form-group {
    margin-bottom: 18px;
}

.form-group label {
    display: block;
    margin-bottom: 6px;
    font-weight: 500;
}


/* ============================================================
   FORM INPUTS
============================================================ */

/* Inputs & textarea */
.form-group input,
.form-group textarea {
    width: 100%;
    padding: 8px 10px;
    border-radius: 6px;
    border: 1px solid #ccc;
    font-size: 14px;
    box-sizing: border-box;
}

/* Focus state */
.form-group input:focus,
.form-group textarea:focus {
    outline: none;
    border-color: #2a6df4;
}

/* Textarea behavior */
textarea {
    resize: vertical;
}

/* Number input normalization */
input[type="number"] {
    appearance: textfield;
}


/* ============================================================
   MODAL ACTIONS
============================================================ */

/* Action container */
.modal-actions {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 20px;
}

/* Right-side button group */
.modal-actions-right {
    display: flex;
    gap: 10px;
}

/* Danger button (delete) */
.danger-btn {
    background: #e74c3c;
    color: white;
    border: none;
    padding: 8px 14px;
    border-radius: 6px;
    cursor: pointer;
}

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


/* ============================================================
   FEEDBACK / STATES
============================================================ */

/* Error message */
.form-error {
    display: flex;
    align-items: flex-start;
    gap: 10px;

    padding: 10px 12px;
    border-radius: 6px;

    background-color: #fdecea;
    border: 1px solid #f5c6cb;
    color: #842029;

    font-size: 14px;
    line-height: 1.4;

    margin-top: 10px;
}

/* Utility: hidden element */
.hidden {
    display: none;
}