/* ======================================= */
/* =========== ACCOUNTS STYLING ========== */
/* ======================================= */

/* account navigation links*/
.account-nav {
    display: flex;
    justify-content: center;
    gap: 1rem;
    padding: 1rem 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    margin-bottom: 2rem;
    overflow-x: auto;
    white-space: nowrap;
}

.account-nav .nav-link {
    display: flex;
    align-items: center;
    padding: 0.75rem 1.5rem;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    color: var(--color-text);
    text-decoration: none;
    font-weight: 500;
    transition: all 0.2s ease;
    white-space: nowrap;
    flex-shrink: 0;
}

.account-nav .nav-link:hover {
    background: rgba(255, 255, 255, 0.1);
    color: var(--color-text);
    text-decoration: none;
    border-color: rgba(255, 255, 255, 0.2);
}

.account-nav .nav-link.active {
    background: #2C7BAF;
    color: white;
    border-color: #2C7BAF;
}

/* Page Title */
.page-title {
    color: var(--color-text);
    font-size: 1.8rem;
    font-weight: 600;
    text-transform: uppercase;
    margin-bottom: 1.5rem;
    display: flex;
    align-items: center;
}

/* Account Section */
.account-section {
    background: var(--color-background-grey-dark);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    padding: 2rem;
    margin-bottom: 2rem;
}

.section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.section-title {
    color: var(--color-text);
    font-size: 1.2rem;
    font-weight: 600;
    margin: 0;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* Orders List - accordion style */
.orders-list {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.order-item {
    background: #0b0c0e80;
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    overflow: hidden;
    display: block;
    transition: all 0.2s ease;
}

.order-item:hover {
    border-color: rgba(255, 255, 255, 0.2);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

/* Order Summary */
.order-summary {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    padding: 1.25rem 1.5rem;
    gap: 1.5rem;
}

.order-summary-main {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.order-summary-row {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    flex-wrap: wrap;
}

.order-label {
    color: rgba(255, 255, 255, 0.6);
    font-size: 0.85rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    min-width: 120px;
}

.order-value {
    color: var(--color-text);
    font-size: 0.95rem;
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.order-ref {
    color: var(--color-accent);
    font-weight: 700;
    font-size: 1rem;
    letter-spacing: 0.5px;
}

.order-summary-total {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 0.75rem;
}

.order-total-amount {
    color: var(--color-text);
    font-weight: 700;
    font-size: 1.5rem;
}

.accordion-toggle {
    white-space: nowrap;
    font-size: 0.9rem;
    padding: 0.5rem 1rem;
    border: 1px solid rgba(255, 255, 255, 0.2);
    background: rgba(255, 255, 255, 0.05);
    color: var(--color-text);
}

.accordion-toggle:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: rgba(255, 255, 255, 0.3);
    color: var(--color-text);
}

/* Order Details (Expanded View) */
.order-details {
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.order-details-content {
    padding: 1.5rem;
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.details-section {
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: 8px;
    padding: 1rem;
}

.details-section-title {
    color: var(--color-accent);
    font-size: 0.95rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin: 0 0 1rem 0;
    padding-bottom: 0.75rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

/* Order Items */
.order-items {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.item-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.75rem;
    background: rgba(255, 255, 255, 0.03);
    border-radius: 6px;
    border: 1px solid rgba(255, 255, 255, 0.05);
}

.item-info {
    flex: 1;
    display: flex;
    flex-wrap: wrap;
    gap: 0.25rem;
    align-items: center;
}

.item-name {
    color: var(--color-text);
    font-weight: 600;
    font-size: 0.95rem;
}

.item-variant {
    color: rgba(255, 255, 255, 0.7);
    font-size: 0.85rem;
}

.item-quantity {
    color: rgba(255, 255, 255, 0.6);
    font-size: 0.85rem;
    font-weight: 500;
}

.item-price {
    color: var(--color-text);
    font-weight: 700;
    font-size: 0.95rem;
}

/* License Keys Section - gradient style to highlight */
.license-keys-section {
    margin-top: 0.75rem;
    padding: 0.75rem;
    background: linear-gradient(135deg, rgba(0, 255, 255, 0.05), rgba(255, 0, 255, 0.05));
    border: 1px solid rgba(0, 255, 255, 0.2);
    border-radius: 6px;
}

.license-keys-header {
    color: var(--color-accent);
    font-size: 0.85rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 0.75rem;
}

.license-key-item {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.5rem;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 6px;
    margin-bottom: 0.5rem;
}

.license-key-item:last-child {
    margin-bottom: 0;
}

.key-badges {
    display: flex;
    gap: 0.5rem;
    align-items: center;
    flex-wrap: wrap;
}

.key-platform-badge {
    color: var(--color-text);
    font-weight: 600;
    font-size: 0.8rem;
    background: rgba(255, 255, 255, 0.1);
    padding: 0.25rem 0.65rem;
    border-radius: 12px;
    border: 1px solid rgba(255, 255, 255, 0.15);
    white-space: nowrap;
}

.key-edition-badge {
    color: var(--color-text);
    font-weight: 600;
    font-size: 0.8rem;
    background: linear-gradient(135deg, rgba(83, 159, 210, 0.2), rgba(83, 159, 210, 0.1));
    padding: 0.25rem 0.65rem;
    border-radius: 12px;
    border: 1px solid var(--color-accent);
    white-space: nowrap;
}

.key-code-field {
    display: flex;
    gap: 0.5rem;
    align-items: center;
    flex: 1;
}

.key-code {
    flex: 1;
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.15);
    color: var(--color-text);
    font-family: 'Courier New', monospace;
    font-weight: 600;
    letter-spacing: 1px;
    font-size: 0.85rem;
    padding: 0.5rem 0.75rem;
    border-radius: 4px;
    min-width: 0;
}

.key-code:focus {
    background: rgba(255, 255, 255, 0.12);
    border-color: var(--color-accent);
    box-shadow: 0 0 0 0.15rem rgba(83, 159, 210, 0.2);
    outline: none;
}

.btn-copy {
    width: 38px;
    height: 38px;
    padding: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 4px;
    transition: all 0.2s ease;
    flex-shrink: 0;
}

.btn-copy:hover {
    transform: translateY(-1px);
}

/* Billing Address */
.billing-address-content {
    color: rgba(255, 255, 255, 0.85);
    line-height: 1.6;
}

.address-name {
    color: var(--color-text);
    font-weight: 600;
    margin-bottom: 0.5rem;
    font-size: 1rem;
}

.address-lines div {
    color: rgba(255, 255, 255, 0.8);
    font-size: 0.9rem;
}

.address-phone {
    color: rgba(255, 255, 255, 0.7);
    font-size: 0.9rem;
}

/* Pagination */
.pagination-container {
    margin-top: 2rem;
    padding-top: 1.5rem;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.pagination {
    margin: 0;
    display: flex;
    justify-content: center;
}

.pagination .page-link {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: var(--color-text);
    padding: 0.75rem 1rem;
    margin: 0 0.25rem;
    border-radius: 6px;
    text-decoration: none;
    transition: all 0.2s ease;
}

.pagination .page-link:hover {
    background: rgba(255, 255, 255, 0.1);
    color: var(--color-text);
    border-color: rgba(255, 255, 255, 0.2);
}

.pagination .page-item.active .page-link {
    background: #2C7BAF;
    border-color: #2C7BAF;
    color: white;
}



/* Address Management Styles */
.addresses-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 1.5rem;
}

.address-card {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    padding: 1.5rem;
    transition: all 0.2s ease;
}

.address-card:hover {
    transform: translateY(-2px);
    border-color: rgba(255, 255, 255, 0.2);
}

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

.type-badge {
    padding: 0.25rem 0.75rem;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.type-badge.type-billing {
    background: #2C7BAF;
    color: white;
}


.address-actions .btn-link {
    color: rgba(255, 255, 255, 0.7);
    border: none;
    background: none;
    padding: 0.25rem;
}

.address-actions .btn-link:hover {
    color: var(--color-text);
}

.address-content {
    margin-bottom: 1rem;
}

.address-line {
    margin-bottom: 0.25rem;
}

.address-footer {
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    padding-top: 1rem;
}

/* Style for the "Back to Addresses" button in section-header */
.section-header .btn-outline-secondary {
    color: white !important;
    border-color: rgba(255, 255, 255, 0.3);
}

.section-header .btn-outline-secondary:hover {
    color: white !important;
    background-color: rgba(255, 255, 255, 0.1);
    border-color: rgba(255, 255, 255, 0.5);
}

/* ====================================*/
/* ========== MEDIA QUERIES ========== */
/* ====================================*/


@media (max-width: 768px) {
    .account-nav {
        flex-direction: column;
        gap: 0.5rem;
        justify-content: center;
    }

    .account-nav .nav-link {
        justify-content: center;
        white-space: normal;
        text-align: center;
        flex-shrink: 1;
    }

    .page-title {
        font-size: 1.5rem;
        text-align: center;
        justify-content: center;
    }

    .order-summary {
        flex-direction: column;
        gap: 1rem;
    }

    .order-summary-total {
        align-items: flex-start;
        width: 100%;
    }

    .order-label {
        min-width: 100px;
        font-size: 0.8rem;
    }

    .accordion-toggle {
        width: 100%;
        justify-content: center;
    }

    .item-row {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.5rem;
    }

    .license-key-item {
        flex-direction: column;
        align-items: stretch;
    }

    .key-code-field {
        width: 100%;
    }

    .addresses-grid {
        grid-template-columns: 1fr;
    }

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

@media (max-width: 576px) {
    .account-section {
        padding: 1rem;
        margin-left: -0.5rem;
        margin-right: -0.5rem;
        border-radius: 0;
    }

    .order-summary {
        padding: 1rem;
    }

    .order-details-content {
        padding: 1rem;
    }

    .details-section {
        padding: 0.75rem;
    }



    .order-label {
        min-width: 90px;
    }
}