/**
 * Derris Return & Exchange Portal CSS
 * Aesthetic: Ultra-Modern, Gokwik / Return Prime Clean Style
 * STRICT RULES:
 * 1. Zero border-radius (border-radius: 0px !important on everything)
 * 2. Small, luxury typography (9px - 10px, clean tracking)
 * 3. Mobile screen optimized (max-width: 440px container, bottom sticky CTA bar)
 */

/* Force Zero Border Radius & Inherit Website Font Globally for Portal */
.derris-portal-wrapper,
.derris-portal-wrapper *,
.derris-portal-wrapper *::before,
.derris-portal-wrapper *::after,
.derris-modal-overlay,
.derris-modal-overlay * {
    border-radius: 0px !important;
    box-sizing: border-box;
    font-family: inherit !important;
}

/* Outer Wrapper (No Margins from Left and Right) */
.derris-portal-wrapper {
    width: 100% !important;
    min-height: 80vh;
    padding: 0 !important;
    margin: 0 !important;
    background: #ffffff;
    display: flex;
    justify-content: center;
    align-items: flex-start;
    font-family: inherit;
    color: #0f172a;
    -webkit-font-smoothing: antialiased;
}

/* Mobile Screen Container (Made as for Mobile Screen, Zero Left/Right Margins) */
.derris-returns-mobile-container {
    width: 100% !important;
    max-width: 480px;
    background: #ffffff;
    border-left: none !important;
    border-right: none !important;
    border-top: none;
    border-bottom: 1px solid #e2e8f0;
    box-shadow: none;
    position: relative;
    overflow: hidden;
    margin: 0 auto !important;
    padding: 0 !important;
}

/* Ensure WordPress Theme Page Containers have zero left/right margins */
.page-id-8596 #main-content,
.page-id-8596 .entry-content,
.page-id-8596 .nasa-single-page,
.page-id-8596 .container,
.page-id-8596 .row,
.page-id-8596 .col-12 {
    padding-left: 0 !important;
    padding-right: 0 !important;
    margin-left: 0 !important;
    margin-right: 0 !important;
    max-width: 100% !important;
    width: 100% !important;
}

/* Header & Brand Banner */
.derris-portal-header {
    background: #000000;
    color: #ffffff;
    padding: 16px 18px;
    border-bottom: 2px solid #000000;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.derris-brand-title {
    font-size: 13px;
    font-weight: 900;
    letter-spacing: 0.15em;
    text-transform: uppercase;
    margin: 0;
    color: #ffffff;
}

.derris-brand-subtitle {
    font-size: 9px;
    font-weight: 600;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: #94a3b8;
    margin: 2px 0 0 0;
}

.derris-header-badge {
    font-size: 8.5px;
    font-weight: 700;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    background: #ffffff;
    color: #000000;
    padding: 3px 6px;
    border: 1px solid #ffffff;
}

/* Navigation Tabs (Request Return / Track Status) */
.derris-top-nav-tabs {
    display: flex;
    border-bottom: 1px solid #e2e8f0;
    background: #f8fafc;
}

.derris-nav-tab {
    flex: 1;
    text-align: center;
    padding: 11px 8px;
    font-size: 9.5px;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: #64748b;
    background: #f8fafc;
    border: none;
    border-bottom: 2px solid transparent;
    cursor: pointer;
    transition: all 0.2s ease;
}

.derris-nav-tab.active {
    color: #000000;
    background: #ffffff !important;
    border-bottom: 2px solid #000000;
    font-weight: 800;
}

/* Step Progress Indicator */
.derris-step-indicator {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 10px 16px;
    background: #f1f5f9;
    border-bottom: 1px solid #e2e8f0;
    font-size: 9px;
    font-weight: 700;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: #475569;
}

.derris-step-indicator span.active {
    color: #000000;
    font-weight: 900;
}

/* Card & Content Section */
.derris-portal-body {
    padding: 18px 16px;
    min-height: 380px;
}

/* Form Groups & Typography */
.derris-form-group {
    margin-bottom: 14px;
}

.derris-label {
    display: block;
    font-size: 9px;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: #0f172a;
    margin-bottom: 5px;
}

.derris-label .optional {
    color: #94a3b8;
    font-weight: 500;
}

.derris-input, .derris-select, .derris-textarea {
    width: 100%;
    padding: 10px 12px;
    font-size: 10px;
    font-weight: 600;
    font-family: inherit;
    color: #000000;
    background: #ffffff;
    border: 1px solid #cbd5e1;
    outline: none;
    transition: border-color 0.2s;
    LINE-HEIGHT: 4PX;
}

.derris-input:focus,
.derris-select:focus,
.derris-textarea:focus {
    border-color: #000000;
    box-shadow: none;
}

.derris-input::placeholder,
.derris-textarea::placeholder {
    color: #94a3b8;
    font-weight: 500;
}

/* Helper Notes & Banners */
.derris-info-banner {
    padding: 10px 12px;
    margin-bottom: 14px;
    font-size: 9.5px;
    line-height: 1.4;
    border: 1px solid #e2e8f0;
    background: #f8fafc;
}

.derris-info-banner.free-pickup {
    background: #ecfdf5;
    border-color: #a7f3d0;
    color: #065f46;
    font-weight: 600;
}

.derris-info-banner.restriction {
    background: #fffbeb;
    border-color: #fde68a;
    color: #92400e;
    font-weight: 600;
}

.derris-info-banner.error {
    background: #fef2f2;
    border-color: #fecaca;
    color: #991b1b;
    font-weight: 600;
}

.derris-info-banner.success {
    background: #f0fdf4;
    border-color: #bbf7d0;
    color: #166534;
    font-weight: 600;
}

/* Order Summary Header Card */
.derris-order-meta-box {
    background: #000000;
    color: #ffffff;
    padding: 14px 16px;
    margin-bottom: 16px;
    border: 1px solid #000000;
}

.derris-order-meta-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 8px;
}

.derris-order-number {
    font-size: 12px;
    font-weight: 900;
    letter-spacing: 0.08em;
    font-family: inherit;
}

.derris-delivery-status {
    font-size: 8.5px;
    font-weight: 700;
    padding: 2px 6px;
    background: #ffffff;
    color: #000000;
    letter-spacing: 0.05em;
    text-transform: uppercase;
}

.derris-order-meta-sub {
    font-size: 9px;
    color: #94a3b8;
    line-height: 1.5;
}

.derris-order-meta-sub strong {
    color: #ffffff;
}

/* Line Items Selection List */
.derris-items-list {
    margin-bottom: 16px;
}

.derris-item-card {
    border: 1px solid #e2e8f0;
    background: #ffffff;
    margin-bottom: 10px;
    padding: 12px;
    transition: border-color 0.2s;
    position: relative;
}

.derris-item-card.selected {
    border-color: #000000;
    box-shadow: 0 0 0 1px #000000;
}

.derris-item-card.restricted {
    background: #fafafa;
    border-style: dashed;
}

.derris-item-row {
    display: flex;
    gap: 12px;
    align-items: flex-start;
}

.derris-item-checkbox {
    margin-top: 4px;
}

.derris-custom-checkbox {
    width: 16px;
    height: 16px;
    border: 1px solid #94a3b8;
    background: #ffffff;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
}

.derris-item-card.selected .derris-custom-checkbox {
    background: #000000;
    border-color: #000000;
    color: #ffffff;
}

.derris-item-image {
    width: 50px;
    height: 60px;
    background: #f1f5f9;
    border: 1px solid #e2e8f0;
    object-fit: cover;
    flex-shrink: 0;
}

.derris-item-info {
    flex: 1;
    min-width: 0;
}

.derris-item-title {
    font-size: 10px;
    font-weight: 700;
    color: #0f172a;
    margin: 0 0 3px 0;
    line-height: 1.3;
}

.derris-item-variant {
    font-size: 9px;
    font-weight: 600;
    font-family: inherit;
    color: #475569;
    margin-bottom: 3px;
}

.derris-item-price-row {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 9px;
    color: #64748b;
}

.derris-item-price {
    font-weight: 800;
    color: #000000;
}

/* Action Selector Pills (Exchange / Return / Alteration) */
.derris-action-pills {
    display: flex;
    gap: 6px;
    margin-top: 10px;
    padding-top: 10px;
    border-top: 1px solid #f1f5f9;
}

.derris-action-pill {
    flex: 1;
    padding: 8px 4px;
    font-size: 8.5px;
    font-weight: 800;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    text-align: center;
    border: 1px solid #cbd5e1;
    background: #ffffff;
    color: #475569;
    cursor: pointer;
    transition: all 0.2s;
}

.derris-action-pill.active {
    background: #000000;
    border-color: #000000;
    color: #ffffff;
}

.derris-action-pill.disabled {
    opacity: 0.35;
    cursor: not-allowed;
    background: #f1f5f9;
    color: #94a3b8;
    border-color: #e2e8f0;
    text-decoration: line-through;
}

.derris-action-pill.alteration-only {
    border-color: #7c3aed;
    color: #7c3aed;
}

.derris-action-pill.alteration-only.active {
    background: #7c3aed;
    color: #ffffff;
}

/* Item Action Details Panel */
.derris-action-details-panel {
    margin-top: 12px;
    padding: 10px 12px;
    background: #f8fafc;
    border: 1px solid #e2e8f0;
}

/* Live Exchange Catalog Modal / Drawer */
.derris-modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.7);
    z-index: 999999;
    display: flex;
    align-items: flex-end;
    justify-content: center;
}

@media (min-width: 480px) {
    .derris-modal-overlay {
        align-items: center;
        padding: 20px;
    }
}

.derris-modal-container {
    width: 100%;
    max-width: 440px;
    max-height: 85vh;
    background: #ffffff;
    border: 1px solid #000000;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.derris-modal-header {
    background: #000000;
    color: #ffffff;
    padding: 12px 14px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.derris-modal-title {
    font-size: 11px;
    font-weight: 900;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    margin: 0;
}

.derris-modal-close {
    background: transparent;
    border: none;
    color: #ffffff;
    font-size: 16px;
    font-weight: 700;
    cursor: pointer;
    line-height: 1;
}

.derris-modal-body {
    /* padding: 14px; */
    overflow-y: auto;
    flex: 1;
}

/* Shop Page Style Grid: 2 Products in a row */
.derris-shop-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 8px;
    padding: 10px;
}

.derris-shop-card {
    background: #ffffff;
    border: 1px solid #e2e8f0;
    display: flex;
    flex-direction: column;
    cursor: pointer;
    overflow: hidden;
    transition: border-color 0.15s, box-shadow 0.15s;
    position: relative;
}

.derris-shop-card:hover {
    border-color: #000000;
}

.derris-shop-card.out-of-stock {
    opacity: 0.6;
}

.derris-shop-card-img-wrap {
    width: 100%;
    aspect-ratio: 2 / 3;
    background: #f8fafc;
    overflow: hidden;
    position: relative;
}

.derris-shop-card-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.derris-shop-card-img-placeholder {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 9px;
    font-weight: 800;
    color: #cbd5e1;
    background: #f1f5f9;
}

.derris-shop-badge-oos {
    position: absolute;
    bottom: 6px;
    left: 6px;
    background: rgba(0, 0, 0, 0.85);
    color: #ffffff;
    font-size: 7.5px;
    font-weight: 800;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    padding: 2px 6px;
}

.derris-shop-card-info {
    padding: 8px;
    display: flex;
    flex-direction: column;
    flex: 1;
    justify-content: space-between;
}

.derris-shop-card-title {
    font-size: 9px;
    font-weight: 700;
    line-height: 1.35;
    color: #0f172a;
    margin: 0 0 4px 0;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-overflow: ellipsis;
    min-height: 24px;
    text-align: center;
}

.derris-shop-card-bottom {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-top: 4px;
    padding-top: 4px;
    border-top: 1px solid #f1f5f9;
}

.derris-shop-card-price {
    font-size: 10px;
    font-weight: 800;
    color: #000000;
}

.derris-shop-card-select-btn {
    background: #fff !important;
    color: #000000;
    border: none !important;
    font-size: 8px;
    font-weight: 800;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    padding: 3px 6px;
    cursor: pointer;
}

.derris-shop-card-select-btn:disabled {
    background: #cbd5e1;
    border-color: #cbd5e1;
    color: #64748b;
    cursor: not-allowed;
}

/* Variant Selection Detail View (Sizes & Body Fit) */
.derris-variant-back-btn {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    background: none;
    border: none;
    font-size: 9px;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: #ffffff;
    cursor: pointer;
    padding: 0;
}

.derris-product-summary-box {
    display: flex;
    gap: 12px;
    align-items: center;
    padding: 10px;
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    margin-bottom: 16px;
}

.derris-product-summary-img {
    width: 50px;
    height: 60px;
    object-fit: cover;
    background: #ffffff;
    border: 1px solid #e2e8f0;
    flex-shrink: 0;
}

.derris-product-summary-title {
    font-size: 10px;
    font-weight: 800;
    color: #000000;
    margin: 0 0 4px 0;
    line-height: 1.35;
}

.derris-product-summary-price {
    font-size: 11px;
    font-weight: 900;
    color: #000000;
    margin: 0;
}

.derris-variant-section {
    margin-bottom: 16px;
}

.derris-variant-heading {
    font-size: 9.5px;
    font-weight: 800;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: #000000;
    margin-bottom: 8px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.derris-variant-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.derris-variant-pill {
    padding: 6px 10px;
    font-size: 9px;
    font-weight: 700;
    font-family: inherit !important;
    border: 1px solid #cbd5e1;
    background: #ffffff !important;
    color: #0f172a;
    cursor: pointer;
    transition: all 0.15s;
    text-align: center;
}

.derris-variant-pill:hover:not(:disabled) {
    border-color: #000000;
}

.derris-variant-pill.active {
    background: #000000 !important;
    color: #ffffff !important;
    border-color: #000000 !important;
}

.derris-variant-pill:disabled,
.derris-variant-pill.disabled {
    opacity: 0.35;
    background: #f8fafc !important;
    border-color: #e2e8f0;
    cursor: not-allowed;
    text-decoration: line-through;
}

.derris-variant-pill.restricted {
    opacity: 0.45;
    background: #fff1f2 !important;
    border-color: #fecdd3;
    color: #9f1239;
    cursor: not-allowed;
    text-decoration: none;
}

.derris-size-pill {
    padding: 4px 6px;
    font-size: 8px;
    font-weight: 700;
    font-family: inherit !important;
    border: 1px solid #cbd5e1;
    background: #ffffff !important;
    color: #0f172a;
    cursor: pointer;
}

.derris-size-pill:hover {
    border-color: #000000;
}

.derris-size-pill.active {
    background: #000000 !important;
    color: #ffffff !important;
    border-color: #000000 !important;
}

.derris-size-pill.out-of-stock {
    opacity: 0.3;
    cursor: not-allowed;
    background: #f1f5f9;
    text-decoration: line-through;
    border-color: #e2e8f0;
}

/* Sticky Bottom Action Bar */
.derris-bottom-bar {
    position: sticky;
    bottom: 0;
    background: #ffffff;
    border-top: 1px solid #e2e8f0;
    padding: 12px 16px;
    box-shadow: 0 -4px 15px rgba(0, 0, 0, 0.05);
    z-index: 100;
}

.derris-btn-primary {
    width: 100%;
    padding: 13px 16px;
    background: #000000;
    color: #ffffff;
    border: 1px solid #000000;
    font-size: 10px;
    font-weight: 900;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    cursor: pointer;
    transition: all 0.2s;
    text-align: center;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.derris-btn-primary:hover {
    background: #1e293b;
    border-color: #1e293b;
}

.derris-btn-primary:disabled {
    background: #94a3b8;
    border-color: #94a3b8;
    cursor: not-allowed;
}

.derris-btn-secondary {
    width: 100%;
    padding: 10px 14px;
    background: #ffffff !important;
    color: #000000 !important;
    border: 1px solid #cbd5e1;
    font-size: 9.5px;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    cursor: pointer;
    transition: all 0.2s;
    margin-top: 6px;
    text-align: center;
}

.derris-btn-secondary:hover {
    border-color: #000000;
}

/* WhatsApp Support Button */
.derris-whatsapp-wrapper {
    margin-top: 24px;
    padding-top: 16px;
    border-top: 1px solid #f1f5f9;
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
}

.derris-whatsapp-title {
    font-size: 9px;
    font-weight: 700;
    color: #64748b;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    margin: 0;
}

.derris-btn-whatsapp {
    width: 100%;
    padding: 12px 16px;
    background: #25D366 !important;
    color: #ffffff !important;
    border: 1px solid #20ba5a !important;
    border-radius: 0px !important;
    font-size: 10px;
    font-weight: 800;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    cursor: pointer;
    transition: all 0.2s ease;
    text-align: center;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    text-decoration: none !important;
    box-sizing: border-box;
    box-shadow: 0 2px 8px rgba(37, 211, 102, 0.2);
}

.derris-btn-whatsapp:hover {
    background: #20ba5a !important;
    border-color: #1da851 !important;
    color: #ffffff !important;
    text-decoration: none !important;
    box-shadow: 0 4px 14px rgba(37, 211, 102, 0.35);
}

.derris-btn-whatsapp:active {
    transform: scale(0.99);
}

.derris-btn-whatsapp svg {
    width: 16px;
    height: 16px;
    fill: #ffffff;
    flex-shrink: 0;
}

/* Confirmation Screen Card */
.derris-confirmation-box {
    text-align: center;
    padding: 24px 16px;
}

.derris-success-icon-box {
    width: 44px;
    height: 44px;
    border: 2px solid #000000;
    background: #ffffff;
    color: #000000;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    margin-bottom: 12px;
}

.derris-ticket-card {
    background: #f8fafc;
    border: 1px solid #000000;
    padding: 14px;
    margin: 16px 0;
    text-align: left;
}

.derris-ticket-row {
    display: flex;
    justify-content: space-between;
    font-size: 9.5px;
    padding: 4px 0;
    border-bottom: 1px dashed #e2e8f0;
}

.derris-ticket-row:last-child {
    border-bottom: none;
}

.derris-ticket-label {
    color: #64748b;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.derris-ticket-val {
    font-weight: 800;
    color: #000000;
    font-family: inherit;
}

/* Spinner & Loader */
.derris-portal-loader {
    padding: 60px 20px;
    text-align: center;
    color: #64748b;
    font-size: 9px;
    font-weight: 700;
    letter-spacing: 0.1em;
}

.derris-portal-spinner {
    width: 24px;
    height: 24px;
    border: 2px solid #e2e8f0;
    border-top-color: #000000;
    animation: derris-spin 0.7s linear infinite;
    margin: 0 auto 12px;
}

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