/* ================================================================
   Design Manager — All Designs  (all-designs.css)
   Moderator / Admin design review page
   ================================================================ */

/* ---- Wrapper ---------------------------------------------------------- */
.dm-apd-wrap {
    max-width: 1100px;
    margin: 0 auto;
    padding: 0 16px 56px;
    font-family: inherit;
    color: #111827;
    box-sizing: border-box;
}
.dm-apd-wrap *, .dm-apd-wrap *::before, .dm-apd-wrap *::after { box-sizing: inherit; }

/* ---- Notice (login / permission) -------------------------------------- */
.dm-apd-notice {
    background: #fffbeb;
    border: 1px solid #fbbf24;
    border-left: 4px solid #f59e0b;
    border-radius: 6px;
    padding: 14px 18px;
    font-size: .9rem;
    color: #374151;
}
.dm-apd-notice a { color: #d97706; font-weight: 600; }

/* ================================================================
   Tabs
   ================================================================ */
.dm-apd-tabs {
    display: flex;
    gap: 4px;
    flex-wrap: wrap;
    border-bottom: 2px solid #e5e7eb;
    margin-bottom: 20px;
}

.dm-apd-tab {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 10px 16px;
    font-size: .82rem;
    font-weight: 600;
    color: #6b7280;
    text-decoration: none;
    border-radius: 6px 6px 0 0;
    border: 1px solid transparent;
    border-bottom: none;
    margin-bottom: -2px;
    transition: color .15s ease, background .15s ease;
    white-space: nowrap;
}

.dm-apd-tab:hover {
    color: #374151;
    background: #f9fafb;
    text-decoration: none;
}

.dm-apd-tab.is-active {
    color: #111827;
    background: #fff;
    border-color: #e5e7eb;
    border-bottom-color: #fff;
    font-weight: 700;
}

.dm-apd-tab .dashicons {
    font-size: 15px;
    width:  15px;
    height: 15px;
    line-height: 1;
}

/* State accent borders */
.dm-apd-tab--pending.is-active           { border-top: 3px solid #3b82f6; }
.dm-apd-tab--changes_requested.is-active { border-top: 3px solid #f59e0b; }
.dm-apd-tab--approved.is-active          { border-top: 3px solid #22c55e; }
.dm-apd-tab--rejected.is-active          { border-top: 3px solid #ef4444; }

/* Badge */
.dm-apd-tab__badge {
    display: inline-block;
    font-size: .7rem;
    font-weight: 700;
    padding: 1px 7px;
    border-radius: 10px;
    background: #f3f4f6;
    color: #374151;
    line-height: 1.4;
}
.dm-apd-tab__badge--urgent {
    background: #fee2e2;
    color: #b91c1c;
}

/* ================================================================
   Panel
   ================================================================ */
.dm-apd-panel {
    background: #fff;
    border: 1px solid #e5e7eb;
    border-radius: 0 6px 6px 6px;
    overflow: hidden;
    box-shadow: 0 1px 3px rgba(0,0,0,.05);
}

/* ================================================================
   Empty state
   ================================================================ */
.dm-apd-empty {
    text-align: center;
    padding: 56px 24px;
}

.dm-apd-empty__icon.dashicons {
    font-size: 48px;
    width:  48px;
    height: 48px;
    color: #d1d5db;
    margin-bottom: 12px;
}

.dm-apd-empty__title {
    font-size: 1.05rem;
    font-weight: 700;
    color: #374151;
    margin: 0 0 6px;
}

.dm-apd-empty__sub {
    font-size: .88rem;
    color: #6b7280;
    margin: 0;
}

/* ================================================================
   Table
   ================================================================ */
.dm-apd-table-wrap {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}

.dm-apd-table {
    width: 100%;
    border-collapse: collapse;
    font-size: .85rem;
}

.dm-apd-table thead th {
    text-align: left;
    font-size: .74rem;
    font-weight: 700;
    color: #6b7280;
    text-transform: uppercase;
    letter-spacing: .05em;
    padding: 10px 14px;
    border-bottom: 2px solid #f3f4f6;
    white-space: nowrap;
    background: #fafafa;
}

.dm-apd-th--thumb   { width: 64px; }
.dm-apd-th--actions { width: 240px; }

.dm-apd-table td {
    padding: 10px 14px;
    border-bottom: 1px solid #f3f4f6;
    vertical-align: middle;
    color: #374151;
}

.dm-apd-table tbody tr:last-child td { border-bottom: none; }
.dm-apd-table tbody tr:hover td      { background: #fafafa; }

/* Thumbnail */
.dm-apd-td--thumb { padding: 8px 10px 8px 14px; }

.dm-apd-td--thumb img {
    display: block;
    width:  52px;
    height: 52px;
    object-fit: cover;
    border-radius: 6px;
    border: 1px solid #e5e7eb;
}

.dm-apd-no-thumb.dashicons {
    font-size: 36px;
    width:  52px;
    height: 52px;
    line-height: 52px;
    text-align: center;
    color: #d1d5db;
    background: #f9fafb;
    border-radius: 6px;
    display: block;
}

/* Title */
.dm-apd-td--title a {
    color: #111827;
    font-weight: 600;
    text-decoration: none;
}
.dm-apd-td--title a:hover { color: #6d28d9; text-decoration: underline; }

.dm-apd-has-response.dashicons {
    font-size: 14px;
    width:  14px;
    height: 14px;
    color: #22c55e;
    margin-left: 5px;
    vertical-align: middle;
}

.dm-apd-notes-snippet {
    font-size: .75rem;
    color: #9ca3af;
    font-style: italic;
    margin: 4px 0 0;
    line-height: 1.4;
}

.dm-apd-notes-snippet--reject { color: #f87171; }

/* Date columns */
.dm-apd-td--date {
    color: #9ca3af;
    font-size: .8rem;
    white-space: nowrap;
}

/* No-action placeholder */
.dm-apd-no-actions {
    color: #d1d5db;
    font-size: .8rem;
}

/* ================================================================
   Action buttons
   ================================================================ */
.dm-apd-td--actions { vertical-align: top; }

.dm-apd-btn-group {
    display: flex;
    gap: 6px;
    flex-wrap: wrap;
}

.dm-apd-btn {
    display: inline-flex;
    align-items: center;
    padding: 6px 13px;
    font-size: .78rem;
    font-weight: 700;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    white-space: nowrap;
    transition: background .15s ease, opacity .15s ease;
    line-height: 1.3;
}

.dm-apd-btn:disabled { opacity: .55; cursor: not-allowed; }

.dm-apd-btn--approve { background: #dcfce7; color: #15803d; }
.dm-apd-btn--approve:hover:not(:disabled) { background: #bbf7d0; }

.dm-apd-btn--changes { background: #fef3c7; color: #92400e; }
.dm-apd-btn--changes:hover:not(:disabled) { background: #fde68a; }

.dm-apd-btn--reject  { background: #fee2e2; color: #b91c1c; }
.dm-apd-btn--reject:hover:not(:disabled)  { background: #fecaca; }

.dm-apd-btn--cancel  { background: #f3f4f6; color: #6b7280; }
.dm-apd-btn--cancel:hover:not(:disabled)  { background: #e5e7eb; }

.dm-apd-btn--sm { padding: 5px 11px; font-size: .76rem; }

/* ================================================================
   Inline forms
   ================================================================ */
.dm-apd-inline-form {
    margin-top: 10px;
    background: #f9fafb;
    border: 1px solid #e5e7eb;
    border-radius: 6px;
    padding: 12px 14px;
    max-width: 380px;
}

.dm-apd-inline-form__lbl {
    font-size: .78rem;
    font-weight: 700;
    color: #374151;
    margin: 0 0 6px;
}

.dm-apd-inline-form__ta {
    width: 100%;
    padding: 8px 10px;
    border: 1px solid #d1d5db;
    border-radius: 5px;
    font-size: .82rem;
    font-family: inherit;
    color: #111827;
    resize: vertical;
    line-height: 1.5;
    background: #fff;
    transition: border-color .15s ease;
}

.dm-apd-inline-form__ta:focus {
    outline: none;
    border-color: #f59e0b;
    box-shadow: 0 0 0 3px rgba(245,158,11,.1);
}

.dm-apd-inline-form__foot {
    display: flex;
    gap: 8px;
    margin-top: 8px;
    flex-wrap: wrap;
}

.dm-apd-inline-form__msg {
    margin-top: 6px;
    font-size: .78rem;
    min-height: 1em;
}

.dm-apd-inline-form__msg.is-error { color: #b91c1c; }

/* ================================================================
   Responsive
   ================================================================ */
@media (max-width: 860px) {
    /* Hide Last Updated column */
    .dm-apd-table th:nth-child(5),
    .dm-apd-table td:nth-child(5) { display: none; }

    .dm-apd-inline-form { max-width: 100%; }
}

@media (max-width: 600px) {
    .dm-apd-tab  { padding: 8px 10px; font-size: .76rem; }

    /* Hide Submitted column too */
    .dm-apd-table th:nth-child(4),
    .dm-apd-table td:nth-child(4) { display: none; }

    .dm-apd-btn  { padding: 5px 10px; font-size: .74rem; }
}
