/* G-pop Commission Manager — stile allineato a Artist Manager */
.gpop-commission-trigger-wrap { margin-top: 16px; }

.gpop-commission-trigger {
    display: block;
    width: 100%;
    padding: 14px 20px;
    background: transparent;
    color: #0d0d0d;
    border: 2px solid #0d0d0d;
    border-radius: 3px;
    font-size: 12px;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: .1em;
    cursor: pointer;
    transition: background .15s, color .15s;
}

.gpop-commission-trigger:hover { background: #0d0d0d; color: #fff; }
.gpop-commission-sub { font-size: 11px; color: #888; margin: 6px 0 0; text-align: center; }

/* Modal definitivo: overlay scrollabile, pannello mai tagliato, X sempre visibile */
.gpop-modal-overlay[hidden] {
    display: none !important;
}

.gpop-modal-overlay {
    position: fixed !important;
    inset: 0 !important;
    width: 100vw !important;
    height: 100vh !important;
    background: rgba(0,0,0,.72) !important;
    z-index: 2147483000 !important;
    display: none !important;
    padding: 0 !important;
    margin: 0 !important;
    overflow-x: hidden !important;
    overflow-y: auto !important;
    -webkit-overflow-scrolling: touch !important;
    box-sizing: border-box !important;
    align-items: initial !important;
    justify-content: initial !important;
}

.gpop-modal-overlay.gpop-aperto {
    display: block !important;
}

.gpop-modal {
    position: relative !important;
    display: block !important;
    top: auto !important;
    right: auto !important;
    bottom: auto !important;
    left: auto !important;
    transform: none !important;
    width: min(760px, calc(100vw - 28px)) !important;
    max-width: 760px !important;
    min-height: 0 !important;
    max-height: none !important;
    height: auto !important;
    margin: 32px auto !important;
    background: #fff !important;
    overflow: visible !important;
    box-sizing: border-box !important;
    border-radius: 4px !important;
    box-shadow: 0 20px 80px rgba(0,0,0,.35) !important;
}

.gpop-modal-close {
    position: fixed !important;
    top: 14px !important;
    right: 14px !important;
    left: auto !important;
    float: none !important;
    margin: 0 !important;
    z-index: 2147483001 !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    width: 38px !important;
    height: 38px !important;
    border-radius: 999px !important;
    background: #fff !important;
    color: #111 !important;
    border: 1px solid rgba(0,0,0,.14) !important;
    font-size: 16px !important;
    line-height: 1 !important;
    box-shadow: 0 8px 24px rgba(0,0,0,.24) !important;
    cursor: pointer !important;
}

.gpop-modal-close:hover {
    background: #0d0d0d !important;
    color: #fff !important;
}

body.gpop-modal-open {
    overflow: hidden !important;
}

/* Form header */
.gpop-comm-form-wrap { font-family: 'Inter','Helvetica Neue',Arial,sans-serif; }

.gpop-comm-header {
    background: #0d0d0d;
    color: #fff;
    padding: 28px 32px 24px;
}

.gpop-comm-header-label {
    font-size: 10px;
    letter-spacing: .12em;
    text-transform: uppercase;
    color: #555;
    margin-bottom: 5px;
}

.gpop-comm-header-title {
    font-size: 28px;
    font-weight: 900;
    text-transform: uppercase;
    letter-spacing: -.01em;
}

.gpop-comm-header-sub {
    font-size: 12px;
    color: #888;
    margin-top: 8px;
}

/* Form sezioni */
.gpop-form { padding: 0; }
.gpop-form-section {
    padding: 24px 32px;
    border-bottom: 1px solid #f0f0ee;
    background: #fff;
}

.gpop-form-section-title {
    font-size: 11px;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: .1em;
    color: #0d0d0d;
    margin-bottom: 16px;
    padding-bottom: 8px;
    border-bottom: 2px solid #0d0d0d;
}

.gpop-form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 14px;
}

.gpop-form-group { margin-bottom: 14px; }
.gpop-form-group:last-child { margin-bottom: 0; }

.gpop-form-group label {
    display: block;
    font-size: 10px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .1em;
    color: #666;
    margin-bottom: 6px;
}

.gpop-form-group input[type="text"],
.gpop-form-group input[type="email"],
.gpop-form-group textarea,
.gpop-form-group select {
    width: 100%;
    padding: 10px 12px;
    border: 1px solid #ddd;
    border-radius: 3px;
    font-size: 14px;
    font-family: inherit;
    color: #0d0d0d;
    background: #fff;
    outline: none;
    box-sizing: border-box;
    transition: border-color .15s;
}

.gpop-form-group input:focus,
.gpop-form-group textarea:focus,
.gpop-form-group select:focus { border-color: #0d0d0d; }

.gpop-form-group textarea { resize: vertical; }

/* Art picker */
.gpop-art-picker {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 4px;
}

.gpop-art-pick-item {
    cursor: pointer;
    text-align: center;
    width: 90px;
}

.gpop-art-pick-item input[type="radio"] { display: none; }

.gpop-art-pick-item img,
.gpop-art-pick-empty {
    width: 80px; height: 80px;
    object-fit: cover;
    border: 2px solid #e8e8e6;
    border-radius: 4px;
    display: block;
    transition: border-color .15s;
}

.gpop-art-pick-empty {
    display: flex; align-items: center; justify-content: center;
    background: #f5f5f3;
    font-size: 24px; color: #ccc;
}

.gpop-art-pick-item input:checked ~ img,
.gpop-art-pick-item input:checked ~ .gpop-art-pick-empty { border-color: #0d0d0d; }

.gpop-art-pick-item span {
    display: block;
    font-size: 9px;
    font-weight: 700;
    text-transform: uppercase;
    color: #555;
    margin-top: 5px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* Submit row */
.gpop-form-submit-row {
    padding: 24px 32px;
    background: #f5f5f3;
    display: flex;
    align-items: center;
    gap: 16px;
}

.gpop-form-submit-note {
    font-size: 11px;
    color: #888;
}

/* Notice / alert (ereditati dal CSS Artist Manager se presente) */
.gpop-notice  { background:#f0f4ff;border-left:3px solid #4c8bff;color:#1a3fa8;padding:12px 16px;font-size:13px;margin:0 32px 20px; }
.gpop-success { background:#f0fdf4;border-left:3px solid #22c55e;color:#166534;padding:12px 16px;font-size:13px;margin:0 32px 20px; }
.gpop-error   { background:#fef2f2;border-left:3px solid #ef4444;color:#991b1b;padding:12px 16px;font-size:13px;margin:0 32px 20px; }

@media (max-width: 600px) {
    .gpop-form-row { grid-template-columns: 1fr; }
    .gpop-comm-header { padding: 20px; }
    .gpop-form-section { padding: 20px; }
    .gpop-form-submit-row { padding: 20px; flex-direction: column; align-items: flex-start; }
}


@media (max-width: 600px) {
    .gpop-modal {
        width: calc(100vw - 16px) !important;
        margin: 12px auto !important;
    }
    .gpop-modal-close {
        top: 8px !important;
        right: 8px !important;
        width: 36px !important;
        height: 36px !important;
    }
}

/* Modal v1.0.4: classi isolate per evitare override del tema */
html.gpopcm-lock,
body.gpopcm-lock { overflow: hidden !important; }

.gpopcm-overlay[hidden] {
    display: none !important;
    visibility: hidden !important;
    opacity: 0 !important;
    pointer-events: none !important;
}

.gpopcm-overlay {
    position: fixed !important;
    inset: 0 !important;
    width: 100vw !important;
    height: 100vh !important;
    z-index: 2147483600 !important;
    background: rgba(0,0,0,.74) !important;
    display: none !important;
    visibility: hidden !important;
    opacity: 0 !important;
    pointer-events: none !important;
    overflow-x: hidden !important;
    overflow-y: auto !important;
    -webkit-overflow-scrolling: touch !important;
    box-sizing: border-box !important;
    padding: 24px 12px 34px !important;
    margin: 0 !important;
}

.gpopcm-overlay.is-open {
    display: block !important;
    visibility: visible !important;
    opacity: 1 !important;
    pointer-events: auto !important;
}

body.admin-bar .gpopcm-overlay { padding-top: 64px !important; }

.gpopcm-panel {
    position: relative !important;
    display: block !important;
    width: min(760px, calc(100vw - 24px)) !important;
    max-width: 760px !important;
    height: auto !important;
    min-height: 0 !important;
    max-height: none !important;
    margin: 0 auto !important;
    background: #fff !important;
    color: #111 !important;
    border-radius: 4px !important;
    overflow: visible !important;
    box-sizing: border-box !important;
    box-shadow: 0 22px 90px rgba(0,0,0,.38) !important;
    transform: none !important;
    top: auto !important;
    right: auto !important;
    bottom: auto !important;
    left: auto !important;
}

.gpopcm-close {
    position: fixed !important;
    top: 18px !important;
    right: 18px !important;
    z-index: 2147483640 !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    gap: 6px !important;
    min-width: 44px !important;
    height: 42px !important;
    padding: 0 13px !important;
    border-radius: 999px !important;
    border: 1px solid rgba(0,0,0,.16) !important;
    background: #fff !important;
    color: #111 !important;
    font-size: 13px !important;
    font-weight: 800 !important;
    line-height: 1 !important;
    text-transform: uppercase !important;
    letter-spacing: .04em !important;
    box-shadow: 0 8px 24px rgba(0,0,0,.28) !important;
    cursor: pointer !important;
    appearance: none !important;
    -webkit-appearance: none !important;
}

.gpopcm-close:hover {
    background: #111 !important;
    color: #fff !important;
}

body.admin-bar .gpopcm-close { top: 50px !important; }

@media (max-width: 782px) {
    body.admin-bar .gpopcm-overlay { padding-top: 76px !important; }
    body.admin-bar .gpopcm-close { top: 58px !important; }
}

@media (max-width: 600px) {
    .gpopcm-overlay { padding: 14px 8px 24px !important; }
    .gpopcm-panel { width: calc(100vw - 16px) !important; }
    .gpopcm-close {
        top: 10px !important;
        right: 10px !important;
        height: 38px !important;
        font-size: 12px !important;
    }
    body.admin-bar .gpopcm-close { top: 56px !important; }
}
