/* ================================================================
   Store MM — All Products Dev  (all-products-dev.css)
   Moderator / Admin product workflow management page
   ================================================================ */

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

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

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

.smm-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;
}

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

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

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

/* State-specific accent colours */
.smm-apd-tab--submitted.is-active          { border-top: 3px solid #3b82f6; }
.smm-apd-tab--changes_requested.is-active  { border-top: 3px solid #f59e0b; }
.smm-apd-tab--prototyping.is-active        { border-top: 3px solid #8b5cf6; }
.smm-apd-tab--approved.is-active           { border-top: 3px solid #22c55e; }
.smm-apd-tab--rejected.is-active           { border-top: 3px solid #ef4444; }

/* ---- Badge ------------------------------------------------------------ */
.smm-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;
}

.smm-apd-tab__badge--urgent {
    background: #fee2e2;
    color: #b91c1c;
}

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

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

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

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

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

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

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

.smm-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;
}

.smm-apd-th--thumb   { width: 60px;  }
.smm-apd-th--num     { text-align: right; }
.smm-apd-th--actions { width: 220px; text-align: center; }

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

.smm-apd-table tbody tr:last-child td { border-bottom: none; }

.smm-apd-table tbody tr:hover td { background: #fafafa; }

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

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

.smm-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 cell */
.smm-apd-td--title a {
    color: #111827;
    font-weight: 600;
    text-decoration: none;
}
.smm-apd-td--title a:hover { color: #6d28d9; text-decoration: underline; }

.smm-apd-has-files.dashicons {
    font-size: 14px;
    width: 14px;
    height: 14px;
    color: #9ca3af;
    margin-left: 4px;
    vertical-align: middle;
}

/* Numeric columns */
.smm-apd-td--num {
    text-align: right;
    white-space: nowrap;
    font-weight: 600;
    color: #111827;
}

.smm-apd-unset { color: #d1d5db; font-weight: 400; }

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

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

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

.smm-apd-btn-group {
    display: flex;
    gap: 6px;
    flex-wrap: wrap;
    align-items: flex-start;
}

.smm-apd-btn {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    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;
}

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

/* Prototyping */
.smm-apd-btn--proto   { background: #ede9fe; color: #5b21b6; }
.smm-apd-btn--proto:hover:not(:disabled) { background: #ddd6fe; }

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

/* Request Changes */
.smm-apd-btn--changes { background: #fef3c7; color: #92400e; }
.smm-apd-btn--changes:hover:not(:disabled) { background: #fde68a; }

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

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

/* Small variant (inside inline forms) */
.smm-apd-btn--sm { padding: 5px 11px; font-size: .76rem; }

/* ================================================================
   Inline forms (request changes / reject)
   ================================================================ */
.smm-apd-inline-form {
    margin-top: 10px;
    background: #f9fafb;
    border: 1px solid #e5e7eb;
    border-radius: 6px;
    padding: 12px 14px;
    min-width: 260px;
    max-width: 400px;
}

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

.smm-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;
}

.smm-apd-inline-form__ta:focus {
    outline: none;
    border-color: #6d28d9;
    box-shadow: 0 0 0 3px rgba(109,40,217,.1);
}

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

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

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

/* ================================================================
   Responsive
   ================================================================ */
@media (max-width: 860px) {
    /* Hide less critical columns */
    .smm-apd-table th:nth-child(4),
    .smm-apd-table td:nth-child(4),
    .smm-apd-table th:nth-child(6),
    .smm-apd-table td:nth-child(6) { display: none; } /* Category, Royalty */

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

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

    /* Hide even more columns */
    .smm-apd-table th:nth-child(5),
    .smm-apd-table td:nth-child(5),
    .smm-apd-table th:nth-child(7),
    .smm-apd-table td:nth-child(7) { display: none; } /* Price, Date */

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