/* =====================================================================
   admin1.css — styles for the "add content" buttons, modals and forms
   Loaded after style1.css. Uses the same tokens, adds no globals that
   collide with the inventory app.
   ===================================================================== */


/* ---- the small action button that sits in a section head ---- */

.add-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 11px 18px;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: #fff;
    color: var(--ink);
    font-family: 'Inter', system-ui, sans-serif;
    font-size: 0.88rem;
    font-weight: 600;
    cursor: pointer;
    transition: border-color .18s, background .18s, color .18s;
    white-space: nowrap;
}

.add-btn:hover {
    border-color: var(--accent);
    color: var(--accent-ink);
}

.add-btn .plus {
    font-size: 1.05rem;
    line-height: 1;
    color: var(--accent);
}

.add-btn:hover .plus {
    color: var(--accent-ink);
}

.add-btn.locked .plus::after {
    content: '';
}

.admin-actions {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    align-items: center;
}

.admin-hint {
    font-size: 0.78rem;
    color: var(--steel-light);
    width: 100%;
    margin-top: 6px;
}


/* ---- modal shell ---- */

.pa-modal {
    position: fixed;
    inset: 0;
    z-index: 9000;
    display: none;
    align-items: flex-start;
    justify-content: center;
    padding: 28px 18px;
    overflow-y: auto;
    background: rgba(16, 20, 26, .62);
    backdrop-filter: blur(3px);
}

.pa-modal.open {
    display: flex;
}

.pa-modal-box {
    background: var(--bg);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    width: 100%;
    max-width: 720px;
    box-shadow: 0 30px 70px rgba(0, 0, 0, .3);
    animation: paRise .22s ease-out;
}

@keyframes paRise {
    from {
        opacity: 0;
        transform: translateY(14px);
    }
    to {
        opacity: 1;
        transform: none;
    }
}

.pa-modal-head {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 18px;
    padding: 24px 28px 18px;
    border-bottom: 1px solid var(--line);
}

.pa-modal-head h3 {
    font-size: 1.3rem;
    margin-bottom: 4px;
}

.pa-modal-head p {
    font-size: 0.86rem;
    color: var(--steel);
    max-width: 48ch;
}

.pa-close {
    background: transparent;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    width: 34px;
    height: 34px;
    flex: 0 0 34px;
    font-size: 1.15rem;
    line-height: 1;
    color: var(--steel);
    cursor: pointer;
}

.pa-close:hover {
    border-color: var(--accent);
    color: var(--accent-ink);
}

.pa-modal-body {
    padding: 24px 28px;
    display: grid;
    gap: 16px;
}

.pa-modal-foot {
    padding: 18px 28px 24px;
    border-top: 1px solid var(--line);
    display: flex;
    gap: 12px;
    align-items: center;
    flex-wrap: wrap;
}

.pa-modal-foot .spacer {
    flex: 1;
}


/* ---- form grid ---- */

.pa-grid-2 {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
}

.pa-grid-4 {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 12px;
}

@media (max-width: 640px) {
    .pa-grid-2,
    .pa-grid-4 {
        grid-template-columns: 1fr;
    }
}

.pa-field {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.pa-field label {
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--steel);
}

.pa-field .sub {
    font-size: 0.74rem;
    color: var(--steel-light);
    font-weight: 400;
}

.pa-field input,
.pa-field select,
.pa-field textarea {
    font-family: 'Inter', system-ui, sans-serif;
    font-size: 0.92rem;
    color: var(--ink);
    background: #fff;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    padding: 10px 12px;
    width: 100%;
}

.pa-field textarea {
    min-height: 92px;
    resize: vertical;
}

.pa-field input:focus,
.pa-field select:focus,
.pa-field textarea:focus {
    outline: none;
    border-color: var(--accent);
    box-shadow: 0 0 0 3px rgba(163, 112, 31, .12);
}


/* ---- spec fieldset (stroke / load / speed / duty cycle) ---- */

.pa-specset {
    border: 1px solid var(--line);
    border-radius: var(--radius);
    padding: 16px 18px 18px;
    margin: 0;
    background: rgba(255, 255, 255, .55);
}

.pa-specset legend {
    font-size: 0.8rem;
    font-weight: 700;
    color: var(--accent-ink);
    padding: 0 8px;
}


/* ---- image picker ---- */

.pa-drop {
    border: 1px dashed var(--line);
    border-radius: var(--radius);
    background: #fff;
    padding: 18px;
    text-align: center;
    cursor: pointer;
    transition: border-color .18s, background .18s;
}

.pa-drop:hover,
.pa-drop.dragover {
    border-color: var(--accent);
    background: rgba(163, 112, 31, .04);
}

.pa-drop span {
    font-size: 0.86rem;
    color: var(--steel);
    display: block;
}

.pa-drop .big {
    font-weight: 600;
    color: var(--ink);
    margin-bottom: 2px;
}

.pa-drop input[type="file"] {
    display: none;
}

.pa-preview {
    margin-top: 12px;
    display: none;
    position: relative;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    overflow: hidden;
    background: #fff;
}

.pa-preview.show {
    display: block;
}

.pa-preview img {
    display: block;
    width: 100%;
    max-height: 240px;
    object-fit: contain;
    background: var(--surface-alt, #E6E8E0);
}

.pa-preview .drop-clear {
    position: absolute;
    top: 8px;
    right: 8px;
    background: rgba(18, 22, 27, .85);
    color: #fff;
    border: 0;
    border-radius: var(--radius);
    padding: 5px 10px;
    font-size: 0.76rem;
    cursor: pointer;
}


/* ---- segments / chips input ---- */

.pa-chiprow {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    margin-top: 8px;
}

.pa-chip {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    background: #fff;
    border: 1px solid var(--line);
    border-radius: 999px;
    padding: 5px 12px;
    font-size: 0.8rem;
    color: var(--ink);
}

.pa-chip button {
    background: transparent;
    border: 0;
    color: var(--steel-light);
    cursor: pointer;
    font-size: 0.95rem;
    line-height: 1;
    padding: 0;
}

.pa-chip button:hover {
    color: var(--accent-ink);
}


/* ---- status line ---- */

.pa-status {
    font-size: 0.85rem;
    padding: 10px 14px;
    border-radius: var(--radius);
    display: none;
}

.pa-status.show {
    display: block;
}

.pa-status.ok {
    background: rgba(18, 103, 106, .1);
    color: var(--teal);
    border: 1px solid rgba(18, 103, 106, .3);
}

.pa-status.err {
    background: rgba(163, 112, 31, .1);
    color: var(--accent-ink);
    border: 1px solid rgba(163, 112, 31, .3);
}


/* ---- uploaded photos in the picture frames -------------------------
   style1.css sizes .cat-pic svg and .market-pic svg but never the <img>
   case, because those frames only ever held drawn illustrations. A photo
   added through the form arrives as an <img>, so it needs the same
   absolute fill or it overflows its frame at natural size.              */

.cat-pic img,
.market-pic img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
}


/* ---- badge on user-added cards + delete control ---- */

.pa-added-badge {
    position: absolute;
    top: 10px;
    left: 10px;
    background: var(--teal);
    color: #fff;
    font-size: 0.68rem;
    font-weight: 700;
    letter-spacing: .04em;
    text-transform: uppercase;
    padding: 4px 9px;
    border-radius: var(--radius);
    z-index: 3;
}

.pa-del {
    position: absolute;
    top: 10px;
    right: 10px;
    z-index: 3;
    background: rgba(18, 22, 27, .82);
    color: #fff;
    border: 0;
    border-radius: var(--radius);
    font-size: 0.72rem;
    padding: 5px 10px;
    cursor: pointer;
}

.pa-del:hover {
    background: var(--accent-ink);
}


/* ---- inquiry form extras ---- */

.contact-panel .pa-grid-2 {
    gap: 14px;
}

.contact-panel .pa-specset {
    background: rgba(238, 240, 234, .7);
    border-color: var(--line);
}

.contact-panel .pa-field input,
.contact-panel .pa-field select {
    background: #fff;
}

.inq-note {
    font-size: 0.76rem;
    color: var(--steel-light);
    margin-top: 10px;
}