/* ══════════════════════════════════════════════════════════════════
   POD Designer – Frontend Stylesheet
   Design aesthetic: Dark studio / print-shop. Industrial precision.
   Fonts: system monospace for numbers, clean sans for labels.
══════════════════════════════════════════════════════════════════ */

/* ── Custom properties ─────────────────────────────────────────── */
:root {
    --pod-bg: #0f0f0f;
    --pod-surface: #1a1a1a;
    --pod-surface-2: #242424;
    --pod-border: #2e2e2e;
    --pod-accent: #e8c547;
    /* warm gold — print-shop feel */
    --pod-accent-dim: #b89a2f;
    --pod-text: black;
    --pod-text-muted: #888;
    --pod-danger: #e05050;
    --pod-radius: 8px;
    --pod-shadow: 0 24px 80px rgba(0, 0, 0, .7);
    --pod-transition: 0.2s ease;
}

/* ── Body lock ─────────────────────────────────────────────────── */
body.pod-modal-open {
    overflow: hidden;
}

/* ── Trigger button on product page ───────────────────────────── */
.pod-customizer-trigger {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: var(--pod-accent);
    color: #1a1a00;
    border: none;
    border-radius: var(--pod-radius);
    padding: 10px 20px !important;
    font-size: 16px;
    font-weight: 700;
    letter-spacing: .3px;
    cursor: pointer;
    transition: background var(--pod-transition), transform var(--pod-transition);
    margin-bottom: 14px;
    width: 50% !important;
    justify-content: center;
    text-transform: capitalize !important;
}

.pod-customizer-trigger:hover {
    background: var(--pod-accent-dim);
}

.ast-sticky-add-to-cart-action-wrap .pod-customizer-trigger {
    margin-left: 8px !important;
    padding: 11px 25px !important;
    line-height: 1rem !important;
}

.ast-sticky-add-to-cart-action-wrap .cart{
    align-items: stretch !important;
}

.woocommerce-js .quantity .qty {
    height: 100% !important;
}
/* ══════════════════════════════════════════════════════════════════
   MODAL OVERLAY
══════════════════════════════════════════════════════════════════ */
#pod-modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, .85);
    z-index: 999999;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 16px;
    animation: podFadeIn .2s ease;
}

@keyframes podFadeIn {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}

/* ── Modal shell ───────────────────────────────────────────────── */
#pod-modal {
    background: var(--pod-bg);
    border: 1px solid var(--pod-border);
    border-radius: 12px;
    box-shadow: var(--pod-shadow);
    width: 100%;
    max-width: 1100px;
    max-height: 92vh;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    animation: podSlideUp .25s ease;
}

@keyframes podSlideUp {
    from {
        transform: translateY(24px);
        opacity: 0;
    }

    to {
        transform: translateY(0);
        opacity: 1;
    }
}

/* ── Loading state ─────────────────────────────────────────────── */
#pod-modal-loading {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 14px;
    padding: 80px 40px;
    color: var(--pod-text-muted);
    font-size: 15px;
}

.pod-spinner {
    width: 24px;
    height: 24px;
    border: 3px solid var(--pod-border);
    border-top-color: var(--pod-accent);
    border-radius: 50%;
    animation: podSpin .7s linear infinite;
    display: inline-block;
}

@keyframes podSpin {
    to {
        transform: rotate(360deg);
    }
}

/* ── Header ────────────────────────────────────────────────────── */
#pod-modal-header {
    display: flex;
    flex-direction: column;
    gap: 8px;
    padding: 16px 24px;
    border-bottom: 1px solid var(--pod-border);
    background: var(--pod-surface);
    flex-shrink: 0;
}

.pod-header-wrap{
    display: flex;
    align-items: center;
    justify-content: space-between;
}

#pod-modal-header h2 {
    margin: 0;
    font-size: 18px;
    font-weight: 700;
    color:  white;
    letter-spacing: .3px;
}

.pod-header-tools {
    display: flex;
    gap: 8px;
    align-items: center;
}

/* ── Buttons ───────────────────────────────────────────────────── */
.pod-btn {
    border: 1px solid var(--pod-border);
    border-radius: 6px;
    padding: 8px 16px;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    transition: all var(--pod-transition);
    line-height: 1;
}

.pod-btn--ghost {
    background: transparent;
    color: var(--pod-text-muted);
}

.pod-btn--ghost:hover {
    color: var(--pod-text);
    border-color: var(--pod-text-muted);
}

.pod-btn--ghost.active {
    color: var(--pod-accent);
    border-color: var(--pod-accent);
    background: rgba(232, 197, 71, .08);
}

.pod-btn--primary {
    background: var(--pod-accent);
    color: #111;
    border-color: var(--pod-accent);
    width: 100%;
    padding: 14px 20px;
    font-size: 15px;
    border-radius: var(--pod-radius);
    letter-spacing: .3px;
}

.pod-btn--primary:hover {
    background: var(--pod-accent-dim);
}

.pod-btn--primary:disabled {
    opacity: .5;
    cursor: not-allowed;
}

.pod-close-x {
    padding: 6px 10px;
    font-size: 16px;
}

/* ── Body layout ───────────────────────────────────────────────── */
#pod-modal-body {
    display: flex;
    flex: 1;
    overflow: hidden;
    min-height: 0;
}

/* ── Canvas pane ───────────────────────────────────────────────── */
#pod-canvas-pane {
    flex: 1 1 auto;
    background: var(--pod-surface);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 24px;
    overflow: hidden;
    position: relative;
    border-right: 1px solid var(--pod-border);
}

#pod-canvas-wrap {
    border: 1px solid var(--pod-border);
    border-radius: var(--pod-radius);
    overflow: hidden;
    box-shadow: 0 4px 32px rgba(0, 0, 0, .5);
    line-height: 0;
    overflow: auto;
}

#pod-coord-display {
    position: absolute;
    bottom: 16px;
    left: 50%;
    transform: translateX(-50%);
    background: rgba(0, 0, 0, .75);
    color: var(--pod-accent);
    font-family: 'Courier New', monospace;
    font-size: 13px;
    font-weight: 700;
    padding: 6px 16px;
    border-radius: 40px;
    letter-spacing: 1px;
    pointer-events: none;
    border: 1px solid var(--pod-accent);
}

/* ── Controls pane ─────────────────────────────────────────────── */
#pod-controls-pane {
    width: 300px;
    flex-shrink: 0;
    background: var(--pod-bg);
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

#pod-fields-form {
    flex: 1;
    overflow-y: auto;
    padding: 20px;
    scrollbar-width: thin;
    scrollbar-color: var(--pod-border) transparent;
}

#pod-fields-form::-webkit-scrollbar {
    width: 5px;
}

#pod-fields-form::-webkit-scrollbar-track {
    background: transparent;
}

#pod-fields-form::-webkit-scrollbar-thumb {
    background: var(--pod-border);
    border-radius: 4px;
}

#pod-actions {
    padding: 16px 20px;
    border-top: 1px solid var(--pod-border);
    flex-shrink: 0;
}

/* ── Field controls ────────────────────────────────────────────── */
.pod-field-control {
    margin-bottom: 20px;
}

.pod-field-control label {
    display: block;
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .8px;
    color: var(--pod-text-muted);
    margin-bottom: 8px;
}

/* ── Text zone ─────────────────────────────────────────────────── */
.pod-text-zone {}

.pod-text-input {
    width: 100%;
    background: var(--pod-surface-2);
    border: 1px solid var(--pod-border);
    border-radius: 6px;
    color: var(--pod-text);
    padding: 10px 12px;
    font-size: 14px;
    resize: vertical;
    box-sizing: border-box;
    font-family: inherit;
    transition: border-color var(--pod-transition);
}

.pod-text-input:focus {
    outline: none;
    border-color: var(--pod-accent);
}

.pod-text-input::placeholder {
    color: var(--pod-text-muted);
}

.pod-char-count {
    text-align: right;
    font-size: 11px;
    color: var(--pod-text-muted);
    margin-top: 4px;
    font-family: 'Courier New', monospace;
}

/* ── Upload zone ───────────────────────────────────────────────── */
.pod-upload-zone {
    border: 2px dashed var(--pod-border);
    border-radius: 8px;
    overflow: hidden;
    transition: border-color var(--pod-transition);
    cursor: pointer;
}

.pod-upload-zone.dragover,
.pod-upload-zone:hover {
    border-color: var(--pod-accent);
}

.pod-upload-label {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 24px 16px;
    cursor: pointer;
    color: var(--pod-text-muted);
    font-size: 13px;
    transition: color var(--pod-transition);
    text-align: center;
}

.pod-upload-label.has-image {
    padding: 8px;
}

.pod-upload-icon {
    font-size: 28px;
}

.pod-upload-thumb {
    width: 100%;
    height: 100px;
    object-fit: cover;
    display: block;
    border-radius: 6px;
}

/* ══════════════════════════════════════════════════════════════════
   RESPONSIVE
══════════════════════════════════════════════════════════════════ */
@media (max-width: 700px) {
    #pod-modal-body {
        flex-direction: column;
    }

    #pod-controls-pane {
        width: 100%;
        max-height: 220px;
        border-top: 1px solid var(--pod-border);
    }

    #pod-canvas-pane {
        padding: 12px;
        border-right: none;
    }
}
/* ── Zoom slider (image fields) ────────────────────────────────── */
input[type=range] {
  -webkit-appearance: none; /* Hides the slider so that custom slider can be made */
  width: 100%; /* Specific width is required for Firefox. */
  background: transparent; /* Otherwise white in Chrome */
}

input[type=range]::-webkit-slider-thumb {
  -webkit-appearance: none;
}

input[type=range]:focus {
  outline: none; /* Removes the blue border. You should probably do some kind of focus styling for accessibility reasons though. */
}

input[type=range]::-ms-track {
  width: 100%;
  cursor: pointer;

  /* Hides the slider so custom styles can be added */
  background: transparent; 
  border-color: transparent;
  color: transparent;
}

input[type='range']::-webkit-slider-runnable-track {
  /* This creates that white 'edge' at the bottom */
  box-shadow: 0 1px 0px rgba(255, 255, 255, 0.2); 
}

.pod-zoom-wrap {
    margin-top    : 8px;
    padding       : 8px 10px;
    background    : var(--pod-surface-2);
    border        : 1px solid var(--pod-border);
    border-radius : 6px;
    display       : flex;
    align-items   : center;
    gap           : 8px;
}
.pod-zoom-label {
    font-size     : 11px;
    color         : var(--pod-text-muted);
    white-space   : nowrap;
    flex-shrink   : 0;
}
.pod-zoom-slider {
    flex          : 1;
    accent-color  : var(--pod-accent);
    cursor        : pointer;
    height        : 4px;
}
.pod-zoom-value {
    font-size     : 11px;
    font-family   : 'Courier New', monospace;
    color         : var(--pod-accent);
    min-width     : 36px;
    text-align    : right;
    flex-shrink   : 0;
}

/* Pod Text Area */
.pod-text-input {
  background-color: #000 !important; /* black background */
  color: #fff !important; /* readable text */
  padding: 10px 12px;
  border-radius: 6px !important;
  outline: none;
  width: 100%;
  border: 1px solid var(--pod-border) !important;
}

/* Placeholder styling */
.pod-text-input::placeholder {
  color: rgba(255, 255, 255, 0.6);
}

/* Focus state */
.pod-text-input:focus {
  color: #fff !important;
  box-shadow: 0 0 0 1px var(--pod-border);
}

/* Optional: disabled state */
.pod-text-input:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}