/**
 * Palm Secrets — Palm Photo Upload Styles
 * Luxury Vedic Sanctuary aesthetic matching theme tokens
 */

/* Color Tokens */
:root {
    --ps-paper: #FFFDF8;
    --ps-ivory: #FBF3E3;
    --ps-soft-ivory: #F6E9D2;
    --ps-champagne: #EEDCB8;
    --ps-gold: #C6A05A;
    --ps-deep-gold: #9C7530;
    --ps-bronze: #7C5A22;
    --ps-ink: #2E1A08;
    --ps-deep-ink: #1C0F04;
    --ps-border-subtle: rgba(46, 26, 8, 0.12);
    --ps-border-gold: rgba(198, 160, 90, 0.35);
    --ps-font-display: 'Cormorant Garamond', Georgia, serif;
    --ps-font-sans: 'Jost', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
}

.ps-upload-container {
    font-family: var(--ps-font-sans);
    color: var(--ps-ink);
    max-width: 1100px;
    margin: 0 auto;
    padding: 1.5rem 1rem 3rem;
    box-sizing: border-box;
}

.ps-upload-container * {
    box-sizing: border-box;
}

/* Section Headers */
.ps-section-header {
    margin-bottom: 1.5rem;
}
.ps-section-header.ps-mt-section {
    margin-top: 3rem;
    padding-top: 2rem;
    border-top: 1px solid var(--ps-border-subtle);
}

.ps-step-badge {
    display: inline-block;
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 0.25em;
    text-transform: uppercase;
    color: var(--ps-deep-gold);
    margin-bottom: 0.35rem;
}

.ps-section-title {
    font-family: var(--ps-font-display);
    font-size: 2rem;
    line-height: 1.2;
    font-weight: 400;
    color: var(--ps-ink);
    margin: 0 0 0.5rem;
}

.ps-section-subtitle {
    font-size: 0.875rem;
    color: rgba(46, 26, 8, 0.7);
    line-height: 1.6;
    margin: 0;
}

/* Guidance Card */
.ps-guidance-card {
    background-color: var(--ps-ivory);
    border: 1px solid var(--ps-border-gold);
    padding: 1.5rem 1.75rem;
    margin-bottom: 2.5rem;
    box-shadow: 0 2px 12px rgba(46, 26, 8, 0.03);
}

.ps-guidance-header {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 1rem;
    padding-bottom: 0.75rem;
    border-bottom: 1px solid rgba(46, 26, 8, 0.08);
}

.ps-gold-star {
    color: var(--ps-gold);
    font-size: 1.25rem;
}

.ps-guidance-title {
    font-family: var(--ps-font-display);
    font-size: 1.25rem;
    font-weight: 500;
    color: var(--ps-ink);
    margin: 0;
}

.ps-guidance-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 1.25rem;
}

.ps-guidance-item {
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
}

.ps-guidance-icon {
    font-size: 1.25rem;
    line-height: 1;
    margin-top: 0.15rem;
}

.ps-guidance-item strong {
    display: block;
    font-size: 0.8125rem;
    font-weight: 600;
    color: var(--ps-ink);
    margin-bottom: 0.2rem;
}

.ps-guidance-item p {
    font-size: 0.75rem;
    color: rgba(46, 26, 8, 0.75);
    line-height: 1.5;
    margin: 0;
}

/* Hands Grid */
.ps-hands-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 1.5rem;
}

@media (min-width: 768px) {
    .ps-hands-grid {
        grid-template-columns: 1fr 1fr;
        gap: 2rem;
    }
}

.ps-hand-card {
    background: var(--ps-paper);
    border: 1px solid var(--ps-border-subtle);
    padding: 1.5rem;
    display: flex;
    flex-direction: column;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.ps-hand-card:hover {
    border-color: var(--ps-gold);
    box-shadow: 0 4px 20px rgba(46, 26, 8, 0.05);
}

.ps-hand-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 0.5rem;
}

.ps-hand-title-wrap {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.ps-hand-icon {
    font-size: 1.2rem;
}

.ps-hand-label {
    font-family: var(--ps-font-display);
    font-size: 1.35rem;
    font-weight: 500;
    color: var(--ps-ink);
    margin: 0;
}

.ps-req-asterisk {
    color: #C0392B;
    font-size: 1rem;
    font-weight: bold;
}

.ps-hand-badge {
    font-size: 9px;
    font-weight: 700;
    letter-spacing: 0.15em;
    text-transform: uppercase;
    background: var(--ps-ivory);
    border: 1px solid var(--ps-border-gold);
    color: var(--ps-deep-gold);
    padding: 0.2rem 0.5rem;
}

.ps-hand-desc {
    font-size: 0.75rem;
    color: rgba(46, 26, 8, 0.7);
    line-height: 1.5;
    margin: 0 0 1rem;
}

/* Upload Dropzone */
.ps-upload-slot {
    flex: 1;
    display: flex;
    flex-direction: column;
}

.ps-upload-dropzone {
    border: 2px dashed rgba(198, 160, 90, 0.4);
    background: rgba(251, 243, 227, 0.4);
    padding: 1.75rem 1.25rem;
    text-align: center;
    transition: all 0.2s ease;
    cursor: pointer;
    border-radius: 2px;
}

.ps-upload-dropzone:hover,
.ps-upload-dropzone.ps-drag-over {
    border-color: var(--ps-gold);
    background: rgba(251, 243, 227, 0.85);
}

.ps-dropzone-inner {
    display: flex;
    flex-direction: column;
    align-items: center;
}

.ps-icon-upload-cloud {
    width: 38px;
    height: 38px;
    color: var(--ps-gold);
    margin-bottom: 0.75rem;
}

.ps-dropzone-title {
    font-family: var(--ps-font-display);
    font-size: 1.125rem;
    font-weight: 500;
    color: var(--ps-ink);
    margin: 0 0 0.35rem;
}

.ps-dropzone-limits {
    font-size: 0.7rem;
    color: rgba(46, 26, 8, 0.6);
    margin: 0 0 1.25rem;
}

/* Action Buttons: Camera and Gallery */
.ps-action-buttons-row {
    display: flex;
    flex-direction: column;
    gap: 0.65rem;
    width: 100%;
    max-width: 320px;
}

@media (min-width: 480px) {
    .ps-action-buttons-row {
        flex-direction: row;
    }
}

.ps-btn-capture {
    flex: 1;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.4rem;
    padding: 0.65rem 0.85rem;
    font-size: 0.75rem;
    font-weight: 600;
    letter-spacing: 0.05em;
    cursor: pointer;
    transition: all 0.2s ease;
    border-radius: 0;
    white-space: nowrap;
}

.ps-btn-camera {
    background: var(--ps-ink);
    color: var(--ps-ivory);
    border: 1px solid var(--ps-ink);
}

.ps-btn-camera:hover {
    background: var(--ps-deep-gold);
    border-color: var(--ps-deep-gold);
}

.ps-btn-gallery {
    background: var(--ps-paper);
    color: var(--ps-ink);
    border: 1px solid var(--ps-border-subtle);
}

.ps-btn-gallery:hover {
    border-color: var(--ps-gold);
    color: var(--ps-deep-gold);
    background: var(--ps-ivory);
}

.ps-btn-icon {
    flex-shrink: 0;
}

.ps-file-input {
    display: none !important;
}

/* Preview Slot */
.ps-preview-slot {
    border: 1px solid var(--ps-border-subtle);
    background: #FFF;
    overflow: hidden;
}

.ps-preview-image-wrap {
    position: relative;
    height: 280px;
    background: #F4EAD7;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
}

.ps-preview-img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    display: block;
    background-color: #1C0F04;
}

.ps-preview-overlay-tag {
    position: absolute;
    top: 0.75rem;
    left: 0.75rem;
    background: rgba(28, 15, 4, 0.85);
    color: var(--ps-champagne);
    font-size: 9px;
    font-weight: 700;
    letter-spacing: 0.15em;
    padding: 0.25rem 0.6rem;
    border: 1px solid rgba(198, 160, 90, 0.4);
}

.ps-preview-meta {
    padding: 0.85rem 1rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: var(--ps-paper);
    border-top: 1px solid var(--ps-border-subtle);
    gap: 0.75rem;
}

.ps-file-info {
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.ps-filename {
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--ps-ink);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 140px;
}

.ps-filesize {
    font-size: 0.7rem;
    color: rgba(46, 26, 8, 0.6);
}

.ps-preview-controls {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    flex-shrink: 0;
}

.ps-btn-replace,
.ps-btn-remove {
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    padding: 0.35rem 0.65rem;
    font-size: 0.7rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    border-radius: 0;
}

.ps-btn-replace {
    background: var(--ps-ivory);
    color: var(--ps-ink);
    border: 1px solid var(--ps-border-subtle);
}

.ps-btn-replace:hover {
    background: var(--ps-champagne);
    border-color: var(--ps-gold);
}

.ps-btn-remove {
    background: transparent;
    color: #C0392B;
    border: 1px solid rgba(192, 57, 43, 0.2);
}

.ps-btn-remove:hover {
    background: #FDEDEC;
    border-color: #C0392B;
}

/* Fields Card */
.ps-fields-card {
    background: var(--ps-paper);
    border: 1px solid var(--ps-border-subtle);
    padding: 2rem 1.5rem;
}

@media (min-width: 768px) {
    .ps-fields-card {
        padding: 2.5rem 2rem;
    }
}

.ps-form-row {
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
}

@media (min-width: 768px) {
    .ps-form-row.ps-two-cols {
        flex-direction: row;
    }
    .ps-form-row.ps-two-cols .ps-form-group {
        flex: 1;
    }
}

.ps-form-group {
    display: flex;
    flex-direction: column;
}

.ps-mt-row {
    margin-top: 1.5rem;
}

.ps-label {
    font-size: 0.75rem;
    font-weight: 600;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--ps-ink);
    margin-bottom: 0.45rem;
    display: flex;
    align-items: center;
    gap: 0.25rem;
}

.ps-label-flex {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.ps-optional-tag {
    font-size: 0.7rem;
    font-weight: 400;
    text-transform: none;
    letter-spacing: normal;
    color: rgba(46, 26, 8, 0.55);
}

.ps-char-counter {
    font-size: 0.7rem;
    color: rgba(46, 26, 8, 0.55);
}

.ps-input,
.ps-textarea {
    width: 100%;
    padding: 0.75rem 0.95rem;
    font-family: var(--ps-font-sans);
    font-size: 0.875rem;
    color: var(--ps-ink);
    background: #FFF;
    border: 1px solid rgba(46, 26, 8, 0.18);
    transition: all 0.2s ease;
    border-radius: 0;
}

.ps-input:focus,
.ps-textarea:focus {
    outline: none;
    border-color: var(--ps-gold);
    box-shadow: 0 0 0 3px rgba(198, 160, 90, 0.15);
}

.ps-textarea {
    resize: vertical;
    min-height: 100px;
    line-height: 1.6;
}

.ps-field-hint {
    font-size: 0.7rem;
    color: rgba(46, 26, 8, 0.6);
    margin-top: 0.35rem;
    line-height: 1.4;
}

/* Radio Pills for Dominant Hand */
.ps-radio-pills {
    display: flex;
    gap: 0.75rem;
}

.ps-pill-option {
    flex: 1;
    cursor: pointer;
    margin: 0;
}

.ps-radio-input {
    display: none;
}

.ps-pill-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.75rem 0.85rem;
    background: var(--ps-paper);
    border: 1px solid var(--ps-border-subtle);
    font-size: 0.8125rem;
    color: var(--ps-ink);
    transition: all 0.2s ease;
}

.ps-pill-circle {
    width: 14px;
    height: 14px;
    border-radius: 50%;
    border: 2px solid rgba(46, 26, 8, 0.3);
    transition: all 0.2s ease;
}

.ps-radio-input:checked + .ps-pill-btn {
    background: var(--ps-ivory);
    border-color: var(--ps-gold);
    color: var(--ps-deep-gold);
    box-shadow: 0 2px 8px rgba(198, 160, 90, 0.12);
}

.ps-radio-input:checked + .ps-pill-btn .ps-pill-circle {
    border-color: var(--ps-deep-gold);
    background: var(--ps-deep-gold);
    box-shadow: inset 0 0 0 2px #FFF;
}

/* Topic Grid */
.ps-topic-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 0.75rem;
}

@media (min-width: 600px) {
    .ps-topic-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}
@media (min-width: 900px) {
    .ps-topic-grid {
        grid-template-columns: repeat(4, 1fr);
    }
}

.ps-topic-card {
    cursor: pointer;
    margin: 0;
}

.ps-topic-radio {
    display: none;
}

.ps-topic-card-body {
    height: 100%;
    padding: 1.1rem 1rem;
    background: var(--ps-paper);
    border: 1px solid var(--ps-border-subtle);
    transition: all 0.2s ease;
    display: flex;
    flex-direction: column;
}

.ps-topic-icon {
    font-size: 1.1rem;
    color: var(--ps-gold);
    margin-bottom: 0.4rem;
}

.ps-topic-title {
    font-family: var(--ps-font-display);
    font-size: 1.15rem;
    font-weight: 500;
    color: var(--ps-ink);
    margin-bottom: 0.3rem;
}

.ps-topic-desc {
    font-size: 0.725rem;
    color: rgba(46, 26, 8, 0.65);
    line-height: 1.45;
    margin: 0;
}

.ps-topic-radio:checked + .ps-topic-card-body {
    background: var(--ps-ivory);
    border-color: var(--ps-deep-gold);
    box-shadow: 0 4px 14px rgba(198, 160, 90, 0.15);
}

/* Consent Checkbox */
.ps-consent-box {
    background: var(--ps-ivory);
    border: 1px solid var(--ps-border-gold);
    padding: 1.1rem 1.25rem;
}

.ps-consent-label {
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
    cursor: pointer;
    margin: 0;
}

.ps-checkbox {
    width: 18px;
    height: 18px;
    margin-top: 0.15rem;
    accent-color: var(--ps-deep-gold);
    cursor: pointer;
    flex-shrink: 0;
}

.ps-consent-text {
    font-size: 0.75rem;
    color: rgba(46, 26, 8, 0.85);
    line-height: 1.6;
}

/* Validation Errors */
.ps-field-error {
    font-size: 0.725rem;
    color: #C0392B;
    margin-top: 0.35rem;
    font-weight: 500;
    display: none;
}
.ps-field-error.ps-active {
    display: block;
}

.ps-input.ps-input-invalid,
.ps-textarea.ps-input-invalid {
    border-color: #C0392B !important;
    background-color: #FDEDEC;
}

.ps-error-banner {
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
    background: #FDEDEC;
    border: 1px solid #E6B0AA;
    color: #922B21;
    padding: 1rem 1.25rem;
    margin-bottom: 2rem;
    font-size: 0.8125rem;
    line-height: 1.5;
}

.ps-error-icon {
    font-size: 1.1rem;
    line-height: 1;
}

/* Progress Bar */
.ps-progress-container {
    margin: 2rem 0 1rem;
    padding: 1.25rem;
    background: var(--ps-ivory);
    border: 1px solid var(--ps-border-gold);
}

.ps-progress-label {
    display: flex;
    justify-content: space-between;
    font-size: 0.75rem;
    font-weight: 600;
    letter-spacing: 0.05em;
    color: var(--ps-ink);
    margin-bottom: 0.5rem;
}

.ps-progress-track {
    width: 100%;
    height: 8px;
    background: rgba(46, 26, 8, 0.08);
    overflow: hidden;
}

.ps-progress-bar {
    height: 100%;
    background: linear-gradient(90deg, var(--ps-gold) 0%, var(--ps-deep-gold) 100%);
    transition: width 0.25s ease;
}

/* Submit Bar */
.ps-submit-bar {
    margin-top: 2.5rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1rem;
}

.ps-submit-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.75rem;
    background: var(--ps-ink);
    color: var(--ps-ivory);
    border: none;
    padding: 1.1rem 2.5rem;
    font-family: var(--ps-font-sans);
    font-size: 0.8125rem;
    font-weight: 700;
    letter-spacing: 0.2em;
    text-transform: uppercase;
    cursor: pointer;
    transition: all 0.25s ease;
    width: 100%;
    max-width: 480px;
    border-radius: 0;
}

.ps-submit-btn:hover:not(:disabled) {
    background: var(--ps-deep-gold);
    box-shadow: 0 4px 20px rgba(156, 117, 48, 0.3);
}

.ps-submit-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

.ps-btn-spinner {
    width: 16px;
    height: 16px;
    border: 2px solid rgba(251, 243, 227, 0.3);
    border-top-color: #FFF;
    border-radius: 50%;
    animation: ps-spin 0.8s linear infinite;
}

@keyframes ps-spin {
    to { transform: rotate(360deg); }
}

.ps-privacy-badge {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    font-size: 0.75rem;
    color: rgba(46, 26, 8, 0.65);
    margin: 0;
}

.ps-lock-icon {
    color: var(--ps-gold);
}

/* Success State Screen */
.ps-success-state {
    padding: 2rem 0;
}

.ps-success-card {
    background: var(--ps-paper);
    border: 1px solid var(--ps-border-gold);
    padding: 3rem 2rem;
    text-align: center;
    max-width: 760px;
    margin: 0 auto;
    box-shadow: 0 8px 30px rgba(46, 26, 8, 0.06);
}

.ps-success-icon-badge {
    width: 56px;
    height: 56px;
    margin: 0 auto 1.5rem;
    border-radius: 50%;
    background: var(--ps-ivory);
    border: 1px solid var(--ps-gold);
    display: flex;
    align-items: center;
    justify-content: center;
}

.ps-emblem {
    color: var(--ps-gold);
    font-size: 1.5rem;
}

.ps-subheading {
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 0.28em;
    text-transform: uppercase;
    color: var(--ps-deep-gold);
    margin: 0 0 0.5rem;
}

.ps-success-title {
    font-family: var(--ps-font-display);
    font-size: 2.5rem;
    font-weight: 300;
    color: var(--ps-ink);
    margin: 0 0 1.5rem;
}

.ps-success-message-box {
    background: var(--ps-ivory);
    border: 1px solid rgba(46, 26, 8, 0.1);
    padding: 1.75rem;
    margin-bottom: 2rem;
}

.ps-confirmed-text {
    font-size: 1.05rem;
    font-weight: 500;
    color: var(--ps-ink);
    margin: 0 0 1rem;
    line-height: 1.5;
}

.ps-reference-display {
    display: inline-flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: center;
    gap: 0.75rem;
    background: #FFF;
    border: 1px dashed var(--ps-gold);
    padding: 0.75rem 1.5rem;
}

.ps-ref-label {
    font-size: 0.8125rem;
    color: rgba(46, 26, 8, 0.75);
}

.ps-ref-code {
    font-family: var(--ps-font-sans);
    font-size: 1.35rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    color: var(--ps-deep-gold);
}

.ps-btn-copy {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    padding: 0.35rem 0.65rem;
    background: var(--ps-ivory);
    border: 1px solid var(--ps-border-subtle);
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--ps-ink);
    cursor: pointer;
    transition: all 0.2s ease;
}

.ps-btn-copy:hover {
    background: var(--ps-champagne);
    border-color: var(--ps-gold);
}

.ps-manual-guarantee-note {
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
    text-align: left;
    background: rgba(198, 160, 90, 0.08);
    border-left: 3px solid var(--ps-gold);
    padding: 1rem 1.25rem;
    margin-bottom: 2rem;
    font-size: 0.8125rem;
    line-height: 1.6;
    color: var(--ps-ink);
}

.ps-guarantee-icon {
    color: var(--ps-gold);
    font-size: 1.2rem;
    line-height: 1;
}

.ps-next-steps {
    text-align: left;
    margin-bottom: 2.5rem;
    border-top: 1px solid rgba(46, 26, 8, 0.08);
    padding-top: 1.5rem;
}

.ps-next-steps-heading {
    font-family: var(--ps-font-display);
    font-size: 1.25rem;
    font-weight: 500;
    color: var(--ps-ink);
    margin: 0 0 1rem;
}

.ps-steps-list {
    margin: 0;
    padding-left: 1.25rem;
    font-size: 0.8125rem;
    line-height: 1.7;
    color: rgba(46, 26, 8, 0.85);
}

.ps-steps-list li {
    margin-bottom: 0.5rem;
}

.ps-success-actions {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    justify-content: center;
}

@media (min-width: 540px) {
    .ps-success-actions {
        flex-direction: row;
    }
}

.ps-btn-primary,
.ps-btn-secondary {
    display: inline-block;
    padding: 0.9rem 1.75rem;
    font-size: 0.75rem;
    font-weight: 700;
    letter-spacing: 0.15em;
    text-transform: uppercase;
    text-decoration: none;
    cursor: pointer;
    transition: all 0.2s ease;
    border-radius: 0;
}

.ps-btn-primary {
    background: var(--ps-ink);
    color: var(--ps-ivory);
    border: 1px solid var(--ps-ink);
}

.ps-btn-primary:hover {
    background: var(--ps-deep-gold);
    border-color: var(--ps-deep-gold);
}

.ps-btn-secondary {
    background: var(--ps-paper);
    color: var(--ps-ink);
    border: 1px solid var(--ps-border-subtle);
}

.ps-btn-secondary:hover {
    border-color: var(--ps-gold);
    background: var(--ps-ivory);
}
