/**
 * Artis Withdrawal - Premium Responsive Frontend CSS
 * Font: Geologica, sans-serif
 */

/* Modal Base Styling */
.artis-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 999999;
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: 'Geologica', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
}

.artis-modal-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(15, 23, 42, 0.65); /* Modern Slate tint */
    backdrop-filter: blur(4px);
    transition: opacity 0.3s ease;
}

.artis-modal-container {
    position: relative;
    background: #ffffff;
    width: 92%;
    max-width: 650px;
    max-height: 85vh;
    border-radius: 16px;
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
    overflow-y: auto;
    z-index: 10;
    animation: artisModalSlideIn 0.35s cubic-bezier(0.16, 1, 0.3, 1);
    border: 1px solid #e2e8f0;
}

@keyframes artisModalSlideIn {
    from {
        opacity: 0;
        transform: translateY(20px) scale(0.97);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

.artis-modal-close {
    position: absolute;
    top: 16px;
    right: 20px;
    background: none;
    border: none;
    font-size: 28px;
    line-height: 1;
    color: #94a3b8;
    cursor: pointer;
    transition: color 0.2s ease, transform 0.2s ease;
    padding: 4px;
}

.artis-modal-close:hover {
    color: #475569;
    transform: rotate(90deg);
}

.artis-modal-content {
    padding: 36px;
}

@media (max-width: 600px) {
    .artis-modal-content {
        padding: 20px;
    }
    .artis-modal-container {
        height: 100%;
        max-height: 100vh;
        border-radius: 0;
        width: 100%;
    }
}

/* Header & Typography */
.artis-step-header {
    margin-bottom: 24px;
    border-bottom: 2px solid #f1f5f9;
    padding-bottom: 16px;
}

.artis-step-header h2 {
    font-family: 'Geologica', sans-serif;
    font-size: 22px;
    font-weight: 700;
    color: #0f172a;
    margin: 0 0 6px 0 !important;
}

.artis-step-header p {
    font-size: 14px;
    color: #64748b;
    margin: 0 !important;
}

/* Info Cards */
.artis-form-section {
    background: #f8fafc;
    border: 1px solid #edf2f7;
    border-radius: 12px;
    padding: 20px;
    margin-bottom: 24px;
}

.artis-form-section h3 {
    font-family: 'Geologica', sans-serif;
    font-size: 15px;
    font-weight: 700;
    color: #334155;
    margin: 0 0 16px 0 !important;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.artis-grid-fields {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
}

@media (max-width: 480px) {
    .artis-grid-fields {
        grid-template-columns: 1fr;
        gap: 10px;
    }
}

.form-field-info {
    display: flex;
    flex-direction: column;
    font-size: 13px;
    line-height: 1.5;
}

.form-field-info strong {
    color: #64748b;
    font-weight: 500;
    margin-bottom: 2px;
}

.form-field-info span {
    color: #0f172a;
    font-weight: 600;
}

/* Products Selection List */
.artis-products-selection-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.artis-product-row {
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 10px;
    padding: 12px 16px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    transition: border-color 0.25s ease, box-shadow 0.25s ease;
}

.artis-product-row:hover {
    border-color: #cbd5e1;
}

/* Checked state of row */
.artis-product-row.selected {
    border-color: #780316;
    background: #fffcfc;
}

.product-checkbox-label {
    display: flex;
    align-items: center;
    gap: 14px;
    cursor: pointer;
    flex-grow: 1;
    margin: 0 !important;
}

/* Custom Checkbox Design */
.product-checkbox-label input[type="checkbox"],
.consent-checkbox input[type="checkbox"] {
    display: none;
}

.custom-checkbox {
    width: 20px;
    height: 20px;
    border: 2px solid #cbd5e1;
    border-radius: 6px;
    display: inline-block;
    position: relative;
    background-color: #fff;
    flex-shrink: 0;
    transition: background-color 0.2s, border-color 0.2s;
}

.product-checkbox-label input[type="checkbox"]:checked + .custom-checkbox,
.consent-checkbox input[type="checkbox"]:checked + .custom-checkbox {
    background-color: #780316;
    border-color: #780316;
}

.product-checkbox-label input[type="checkbox"]:checked + .custom-checkbox::after,
.consent-checkbox input[type="checkbox"]:checked + .custom-checkbox::after {
    content: '';
    position: absolute;
    left: 6px;
    top: 2px;
    width: 5px;
    height: 10px;
    border: solid white;
    border-width: 0 2px 2px 0;
    transform: rotate(45deg);
}

.product-thumb {
    width: 48px;
    height: 48px;
    border-radius: 8px;
    overflow: hidden;
    background: #f1f5f9;
    flex-shrink: 0;
}

.product-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.product-info-wrap {
    display: flex;
    flex-direction: column;
}

.product-name {
    font-size: 14px;
    font-weight: 600;
    color: #1e293b;
    line-height: 1.4;
}

.product-meta-price {
    font-size: 12px;
    color: #64748b;
    margin-top: 2px;
}

/* Qty controller */
.product-qty-select {
    display: flex;
    align-items: center;
    gap: 8px;
}

.product-qty-select label {
    font-size: 12px;
    color: #64748b;
    font-weight: 500;
    margin: 0 !important;
}

.qty-control {
    display: flex;
    align-items: center;
    border: 1px solid #cbd5e1;
    border-radius: 8px;
    overflow: hidden;
    height: 32px;
    background: #ffffff;
}

.qty-btn {
    width: 28px;
    height: 100%;
    background: #f8fafc;
    border: none;
    font-size: 15px;
    color: #475569;
    cursor: pointer;
    transition: background 0.15s;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0;
}

.qty-btn:hover {
    background: #e2e8f0;
}

.qty-input {
    width: 32px;
    height: 100%;
    border: none !important;
    border-left: 1px solid #cbd5e1 !important;
    border-right: 1px solid #cbd5e1 !important;
    text-align: center;
    font-size: 13px;
    font-weight: 600;
    color: #0f172a;
    padding: 0 !important;
    margin: 0 !important;
    -moz-appearance: textfield;
}

.qty-input::-webkit-outer-spin-button,
.qty-input::-webkit-inner-spin-button {
    -webkit-appearance: none;
    margin: 0;
}

/* Form Controls */
.artis-form-group {
    margin-bottom: 16px;
    display: flex;
    flex-direction: column;
}

.artis-form-group label {
    font-size: 13px;
    font-weight: 600;
    color: #475569;
    margin-bottom: 6px !important;
}

.artis-form-group label .required {
    color: #dc2626;
}

.artis-form-group input[type="text"],
.artis-form-group select,
.artis-form-group textarea {
    width: 100%;
    padding: 10px 14px;
    border: 1.5px solid #cbd5e1;
    border-radius: 8px;
    font-size: 14px;
    color: #0f172a;
    background-color: #ffffff;
    transition: border-color 0.2s, box-shadow 0.2s;
    font-family: inherit;
    box-sizing: border-box;
}

.artis-form-group input[type="text"]:focus,
.artis-form-group select:focus,
.artis-form-group textarea:focus {
    outline: none;
    border-color: #780316;
    box-shadow: 0 0 0 3px rgba(120, 3, 22, 0.1);
}

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

@media (max-width: 480px) {
    .artis-form-row {
        grid-template-columns: 1fr;
        gap: 0;
    }
}

.section-desc {
    font-size: 13px;
    color: #64748b;
    margin: -10px 0 16px 0 !important;
    line-height: 1.4;
}

/* Info Box */
.artis-info-box {
    background: #eff6ff;
    border: 1px solid #bfdbfe;
    border-radius: 10px;
    padding: 12px 16px;
    display: flex;
    gap: 12px;
    align-items: flex-start;
    margin-bottom: 20px;
}

.info-icon {
    font-size: 16px;
    line-height: 1;
}

.artis-info-box p {
    font-size: 12.5px;
    color: #1e40af;
    margin: 0 !important;
    line-height: 1.4;
}

/* Warning Box */
.artis-warning-box {
    background: #fffbeb;
    border: 1px solid #fef3c7;
    border-radius: 10px;
    padding: 16px;
    display: flex;
    gap: 14px;
    align-items: flex-start;
    margin-bottom: 24px;
}

.warning-icon {
    font-size: 20px;
    line-height: 1;
}

.artis-warning-box strong {
    color: #92400e;
    font-size: 14px;
    display: block;
    margin-bottom: 4px;
}

.artis-warning-box p {
    font-size: 13px;
    color: #b45309;
    margin: 0 !important;
    line-height: 1.4;
}

/* Consent check */
.consent-checkbox {
    margin-bottom: 24px;
}

.consent-checkbox label {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    cursor: pointer;
    font-weight: normal;
}

.consent-text {
    font-size: 12.5px;
    color: #475569;
    line-height: 1.4;
}

/* Buttons */
.artis-btn {
    font-family: 'Geologica', sans-serif;
    font-size: 14px;
    font-weight: 600;
    padding: 11px 24px;
    border-radius: 8px;
    border: none;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    transition: background-color 0.2s, transform 0.1s, opacity 0.2s;
    height: 42px;
    box-sizing: border-box;
}

.artis-btn.primary {
    background-color: #780316;
    color: #ffffff;
}

.artis-btn.primary:hover {
    background-color: #600211;
}

.artis-btn.secondary {
    background-color: #f1f5f9;
    color: #334155;
    border: 1px solid #e2e8f0;
}

.artis-btn.secondary:hover {
    background-color: #e2e8f0;
}

.artis-btn:active {
    transform: scale(0.98);
}

.artis-btn[disabled],
.artis-btn.loading {
    opacity: 0.6;
    pointer-events: none;
}

/* Footer of modal */
.artis-form-footer,
.artis-step-footer {
    display: flex;
    justify-content: flex-end;
    gap: 12px;
    border-top: 2px solid #f1f5f9;
    padding-top: 18px;
    margin-top: 10px;
}

/* Confirmation Details Summary */
.artis-confirmation-summary {
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    padding: 20px;
    margin-bottom: 24px;
}

.artis-confirmation-summary h3 {
    font-size: 14px;
    font-weight: 700;
    color: #334155;
    margin: 0 0 14px 0 !important;
}

.summary-list-items {
    margin: 0 0 16px 0;
    padding: 0;
    list-style: none;
}

.summary-list-items li {
    font-size: 13px;
    color: #475569;
    padding: 6px 0;
    border-bottom: 1px dashed #e2e8f0;
    display: flex;
    justify-content: space-between;
}

.summary-list-items li:last-child {
    border-bottom: none;
}

.summary-bank-details {
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    padding: 12px;
    font-size: 12.5px;
    color: #475569;
    line-height: 1.5;
}

.summary-bank-details strong {
    color: #1e293b;
}

/* Spinner Loaders */
.artis-spinner {
    width: 32px;
    height: 32px;
    border: 3px solid #f1f5f9;
    border-top-color: #780316;
    border-radius: 50%;
    animation: artisSpin 0.8s linear infinite;
    display: inline-block;
}

.artis-spinner-small {
    width: 18px;
    height: 18px;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-top-color: #ffffff;
    border-radius: 50%;
    animation: artisSpin 0.8s linear infinite;
    display: inline-block;
}

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

/* Guest Card Layout */
.artis-guest-withdrawal-wrap {
    width: 100%;
    display: flex;
    justify-content: center;
    font-family: 'Geologica', sans-serif;
    margin: 30px 0;
}

.artis-guest-card {
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 16px;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.05), 0 2px 4px -1px rgba(0, 0, 0, 0.035);
    width: 100%;
    max-width: 680px;
    padding: 36px;
}

@media (max-width: 600px) {
    .artis-guest-card {
        padding: 20px;
    }
}

.artis-card-header {
    margin-bottom: 24px;
    text-align: center;
}

.artis-card-header h2 {
    font-size: 24px;
    font-weight: 700;
    color: #0f172a;
    margin: 0 0 8px 0 !important;
}

.artis-card-header p {
    font-size: 14px;
    color: #64748b;
    margin: 0 !important;
}

.artis-message {
    padding: 12px 16px;
    border-radius: 8px;
    font-size: 13.5px;
    margin-top: 16px;
    line-height: 1.4;
}

.artis-message.error {
    background: #fef2f2;
    border: 1px solid #fee2e2;
    color: #b91c1c;
}

.artis-message.success {
    background: #f0fdf4;
    border: 1px solid #dcfce7;
    color: #15803d;
}

/* My Account Orders Table Action Custom Styling */
a.button.artis_withdraw {
    background-color: #780316 !important;
    color: #ffffff !important;
    border: none;
    border-radius: 6px;
    padding: 6px 12px !important;
    font-size: 12px !important;
    font-weight: 600;
    text-transform: none;
    transition: background-color 0.2s;
}

a.button.artis_withdraw:hover {
    background-color: #600211 !important;
    color: #ffffff !important;
}
