/* Account page styles — opaque dark surfaces, no decorative gradient/blur/hover transform. */

/* ---------- Account tabs shell ---------- */
.account-tabs-shell {
    display: grid;
    gap: 1rem;
}

.account-tabs {
    display: flex;
    gap: 0.75rem;
    margin-bottom: 2.5rem;
    background: var(--color-surface-1);
    padding: 0.75rem;
    border-radius: var(--radius-lg);
    border: 1px solid var(--color-border);
    position: relative;
}

.account-tabs button {
    position: relative;
    flex: 1;
    padding: 1rem 1.5rem;
    background: transparent;
    border: 1px solid transparent;
    border-radius: var(--radius-md);
    color: var(--color-text-muted);
    font-size: 0.9rem;
    font-weight: 600;
    cursor: pointer;
    transition: color 0.2s ease, background-color 0.2s ease, border-color 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.6rem;
    white-space: nowrap;
    overflow: hidden;
}

.account-tabs button:hover {
    color: var(--color-text);
    border-color: var(--color-border);
}

.account-tabs button.active {
    background: var(--color-primary);
    color: #ffffff;
    border-color: var(--color-primary);
}

.account-tabs button .tab-icon {
    width: 1.2rem;
    height: 1.2rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex: none;
}

.account-tabs button .tab-icon .svg-icon {
    width: 100%;
    height: 100%;
}

.tab-label {
    font-weight: 600;
    letter-spacing: 0.01em;
}

/* ---------- Profile / address / orders ---------- */
.profile-section {
    display: grid;
    gap: 2rem;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
}

.account-address-list {
    display: grid;
    gap: 1rem;
    margin-top: 1rem;
}

.account-address-item {
    background: var(--color-surface-1);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-md);
    padding: 1.5rem;
    transition: border-color 0.2s ease, background-color 0.2s ease;
}

.account-address-item:hover {
    border-color: var(--color-border-strong);
}

.account-address-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.75rem;
}

.account-address-name {
    font-weight: 600;
    font-size: 1.1rem;
}

.account-address-badge {
    background: var(--color-primary);
    color: #fff;
    padding: 0.25rem 0.75rem;
    border-radius: 6px;
    font-size: 0.75rem;
    font-weight: 600;
}

.account-address-details {
    color: var(--color-text-muted);
    line-height: 1.6;
}

.account-address-actions {
    display: flex;
    gap: 0.5rem;
    margin-top: 1rem;
}

/* ---------- Orders list ---------- */
.orders-list {
    display: grid;
    gap: 1rem;
    margin-top: 1rem;
}

.order-item {
    background: var(--color-surface-1);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-md);
    padding: 1.5rem;
    transition: border-color 0.2s ease, background-color 0.2s ease;
}

.order-item:hover {
    border-color: var(--color-border-strong);
}

.order-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
    flex-wrap: wrap;
    gap: 1rem;
}

.order-number {
    font-weight: 600;
    font-size: 1.1rem;
}

.order-status {
    padding: 0.25rem 0.75rem;
    border-radius: 999px;
    font-size: 0.85rem;
    font-weight: 500;
    border: 1px solid transparent;
}

.order-status.pending     { background: var(--color-warning-soft);  color: var(--color-warning); border-color: var(--color-warning-border); }
.order-status.processing  { background: var(--color-info-soft);     color: var(--color-info);    border-color: var(--color-info-border); }
.order-status.shipped     { background: var(--color-info-soft);     color: var(--color-info);    border-color: var(--color-info-border); }
.order-status.delivered,
.order-status.completed   { background: var(--color-success-soft);   color: var(--color-success);  border-color: var(--color-success-border); }
.order-status.cancelled   { background: var(--color-danger-soft);    color: var(--color-danger);   border-color: var(--color-danger-border); }

.order-details {
    display: grid;
    gap: 0.5rem;
    color: var(--color-text-muted);
    margin-bottom: 1rem;
}

.order-total {
    font-size: 1.2rem;
    font-weight: 700;
    color: var(--color-accent);
}

/* ---------- Empty / icon placeholders ---------- */
.account-empty-state {
    text-align: center;
    padding: 3rem;
    color: var(--color-text-muted);
}

.account-empty-state-icon {
    width: 4rem;
    height: 4rem;
    margin: 0 auto 1rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: var(--radius-lg);
    color: var(--color-text);
    background: var(--color-surface-1);
    border: 1px solid var(--color-border);
}

.account-empty-state-icon .svg-icon {
    width: 1.75rem;
    height: 1.75rem;
}

.profile-card > .account-icon,
.account-card > .account-icon {
    width: 4rem;
    height: 4rem;
    margin: 0 auto 1rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: var(--radius-lg);
    color: var(--color-text);
    background: var(--color-surface-1);
    border: 1px solid var(--color-border);
    font-size: 0;
}

.profile-card > .account-icon .svg-icon,
.account-card > .account-icon .svg-icon {
    width: 1.8rem;
    height: 1.8rem;
}

.auth-tab-btn .svg-icon {
    width: 1rem;
    height: 1rem;
    margin-right: 0.45rem;
    vertical-align: -0.12em;
}

.btn-group {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.address-form-wrapper {
    margin-top: 1rem;
    padding: 1.5rem;
    background: var(--color-surface-1);
    border-radius: var(--radius-md);
    border: 1px solid var(--color-border);
}

/* ---------- Inline style replacements for CSP compliance ---------- */
.loading-text {
    text-align: center;
    color: var(--color-text-muted);
}

.address-description {
    color: var(--color-text-muted);
    margin-bottom: 1rem;
}

.address-form-title {
    margin-bottom: 1rem;
}

.checkbox-label {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin: 1rem 0;
}

.checkbox-label-login {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 1rem;
}

.form-row {
    display: grid;
    gap: 1rem;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
}

.checkbox-label input[type="checkbox"],
.checkbox-label-login input[type="checkbox"] {
    width: 18px;
    height: 18px;
    cursor: pointer;
    accent-color: var(--color-accent);
    flex-shrink: 0;
}

.checkbox-label span,
.checkbox-label-login span {
    cursor: pointer;
    user-select: none;
}

.crypto-address {
    font-family: 'Courier New', monospace;
    word-break: break-all;
    background: var(--color-surface-1);
    padding: 0.25rem 0.5rem;
    border-radius: 4px;
    user-select: all;
    display: inline-block;
    margin-top: 0.25rem;
}

.payment-hint {
    margin-top: 0.5rem;
    color: var(--color-text-muted);
    font-style: italic;
}

.payment-amount-highlight {
    font-size: 1.1em;
    color: var(--color-accent);
}

.detail-title .svg-icon,
.license-delivery-title .svg-icon,
.payment-hint .svg-icon,
.order-details .svg-icon {
    width: 1rem;
    height: 1rem;
    margin-right: 0.45rem;
    vertical-align: -0.12em;
}

/* success-message / error-message live in css/components/status-notice.css */

.order-total-row {
    border-top: 1px solid var(--color-border);
    margin-top: 1rem;
    font-weight: bold;
    display: flex;
    justify-content: space-between;
    padding: 0.75rem 0;
}

.total-amount {
    color: var(--color-accent);
}

.btn-full-width {
    margin-top: 1rem;
    width: 100%;
}

/* ---------- Modal ---------- */
.modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 1000;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.2s ease;
}

.modal.active {
    opacity: 1;
    pointer-events: auto;
}

.modal-content {
    background: var(--color-surface-1);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-md);
    width: 90%;
    max-width: 800px;
    max-height: 90vh;
    overflow-y: auto;
    padding: 2rem;
    position: relative;
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
    border-bottom: 1px solid var(--color-border);
    padding-bottom: 1rem;
}

.close-modal {
    background: none;
    border: none;
    color: var(--color-text);
    font-size: 2rem;
    cursor: pointer;
    line-height: 1;
}

/* ---------- License box ---------- */
.license-box {
    background: var(--color-success-soft);
    border: 1px solid var(--color-success-border);
    padding: 1rem;
    border-radius: 8px;
    margin-top: 1rem;
}

.license-key {
    font-family: monospace;
    font-size: 1.2rem;
    font-weight: bold;
    color: var(--color-success);
    margin: 0.5rem 0;
    display: block;
}

.license-entry {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 0.5rem;
}

.license-entry .license-key {
    margin: 0;
}

.license-copy-btn {
    cursor: pointer;
    border: 1px solid var(--color-success-border);
    background: var(--color-success-soft);
    color: var(--color-success);
    transition: background-color 0.15s ease;
}

.license-copy-btn:hover {
    background: var(--color-success-soft);
    border-color: var(--color-success);
}

.license-meta {
    display: block;
    width: 100%;
    color: var(--color-text-muted);
    font-size: 0.85rem;
    margin-top: 0.25rem;
}

.detail-section {
    margin-bottom: 2rem;
}

.detail-title {
    font-size: 1.1rem;
    font-weight: 600;
    margin-bottom: 1rem;
    color: var(--color-accent);
}

.item-row {
    display: flex;
    justify-content: space-between;
    padding: 0.75rem 0;
    border-bottom: 1px solid var(--color-border);
}

/* ---------- Mobile responsive ---------- */
@media (max-width: 768px) {
    .account-tabs {
        flex-direction: column;
        gap: 0.5rem;
        padding: 0.5rem;
        border-radius: var(--radius-md);
    }

    .account-tabs button {
        width: 100%;
        padding: 0.9rem 1rem;
        justify-content: flex-start;
        font-size: 0.875rem;
        border-radius: var(--radius-sm);
    }

    .profile-section {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }

    .account-address-list,
    .orders-list {
        gap: 0.75rem;
    }

    .account-address-item,
    .order-item {
        padding: 1rem;
    }

    .account-address-header,
    .order-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.5rem;
    }

    .account-address-actions,
    .btn-group {
        flex-direction: column;
        gap: 0.5rem;
    }

    .account-address-actions button,
    .btn-group button {
        width: 100%;
        padding: 0.75rem;
    }

    .form-row {
        grid-template-columns: 1fr;
    }
}

/* ---------- Helpers ---------- */
.btn-flex {
    flex: 1;
}

.cancel-order-wrapper {
    margin-top: 1rem;
    text-align: right;
}

.pagination {
    /* In-page list pagination (orders/addresses). Differs from the global
       prev/next .pagination in css/components/navigation.css. */
    display: flex;
    justify-content: center;
    gap: 0.5rem;
    margin-top: 1rem;
}

.page-button {
    padding: 0.5rem 1rem;
    border: 1px solid var(--color-border);
    background: var(--color-surface-1);
    color: var(--color-text);
    border-radius: 6px;
    cursor: pointer;
    transition: background-color 0.2s ease, border-color 0.2s ease, color 0.2s ease;
}

.page-button:hover {
    border-color: var(--color-border-strong);
}

.page-button.active {
    background: var(--color-primary);
    color: #fff;
    border-color: var(--color-primary);
}

/* ---------- Auth tabs (login / register) ---------- */
.auth-tab-nav {
    display: flex;
    gap: 0.5rem;
    margin-bottom: 2rem;
    background: var(--color-surface-1);
    padding: 0.5rem;
    border-radius: var(--radius-lg);
    border: 1px solid var(--color-border);
    max-width: 400px;
    margin-left: auto;
    margin-right: auto;
}

.auth-tab-btn {
    flex: 1;
    padding: 0.7rem 1.2rem;
    background: transparent;
    border: 1px solid transparent;
    border-radius: var(--radius-md);
    color: var(--color-text-muted);
    font-size: 0.9rem;
    font-weight: 600;
    cursor: pointer;
    transition: background-color 0.2s ease, border-color 0.2s ease, color 0.2s ease;
}

.auth-tab-btn.active {
    background: var(--color-primary);
    color: #fff;
    border-color: var(--color-primary);
}

.auth-tab-btn:not(.active):hover {
    color: var(--color-text);
    border-color: var(--color-border);
}

/* Auth form: tek kart görünümünde genişlik sınırla, ortala */
.account-grid:has(.auth-form-card) {
    grid-template-columns: 1fr;
    max-width: 540px;
    margin-left: auto;
    margin-right: auto;
}

.auth-form-card {
    transition: border-color var(--transition-base);
}
