/**
 * Mijn eSIM - Dashboard & Account Styles (GoSim-stijl)
 *
 * Custom styles for the /mijn-esim/ WooCommerce My Account page.
 * Includes dashboard layout, circle diagrams, orders table,
 * login/register forms, sidebar navigation, and responsive design.
 *
 * Design tokens (GoSim-stijl):
 *   Primary (orange):  #E87A2E
 *   Blue (circles):    #4A90D9
 *   Dark blue:         #1e3a5f
 *   Gray:              #6b7280
 *   Light bg:          #f9fafb
 *   Border:            #e5e7eb
 *   Success:           #065f46
 *   Border radius:     12px
 *   Font:              'Inter', sans-serif
 */

/* ----------------------------------------------------------------
 *  Page-level spacing fix (dashboard te hoog)
 * -------------------------------------------------------------- */

.woocommerce-account .woocommerce {
    padding-top: 80px;
}

/* col2-set (login/register two-column layout) */
.woocommerce-account .woocommerce .col2-set,
.woocommerce-page .col2-set {
    margin-top: 50px;
}

.woocommerce-account .woocommerce-MyAccount-content {
    margin-top: 20px;
    padding-top: 20px;
    font-family: 'Inter', sans-serif;
}

.woocommerce-account .woocommerce-MyAccount-content > p:first-child {
    /* Hide default "Hello {name}" paragraph when custom dashboard is active */
    display: none;
}

/* ----------------------------------------------------------------
 *  Override #c36 / theme link colors to brand orange
 * -------------------------------------------------------------- */

.woocommerce-account a,
.woocommerce-account .woocommerce a {
    color: #E87A2E;
}

.woocommerce-account a:hover,
.woocommerce-account .woocommerce a:hover {
    color: #d06a20;
}

/* ----------------------------------------------------------------
 *  General / Reset
 * -------------------------------------------------------------- */

.mijn-esim-dashboard {
    font-family: 'Inter', sans-serif;
    color: #1e3a5f;
    max-width: 960px;
}

.mijn-esim-dashboard *,
.mijn-esim-dashboard *::before,
.mijn-esim-dashboard *::after {
    box-sizing: border-box;
}

/* ----------------------------------------------------------------
 *  Welcome heading
 * -------------------------------------------------------------- */

.mijn-esim-welcome {
    font-size: 1.5rem;
    font-weight: 700;
    margin: 0 0 1.5rem;
    color: #1e3a5f;
}

/* ----------------------------------------------------------------
 *  eSIM Switcher (dropdown)
 * -------------------------------------------------------------- */

.mijn-esim-switcher {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 20px;
    padding: 14px 20px;
    background: #ffffff;
    border: 1px solid #e5e7eb;
    border-radius: 12px;
}

.mijn-esim-switcher__label {
    font-size: 14px;
    font-weight: 600;
    color: #1e3a5f;
    white-space: nowrap;
}

.mijn-esim-switcher__select {
    flex: 1;
    font-family: 'Inter', sans-serif;
    font-size: 14px;
    color: #1e3a5f;
    padding: 8px 12px;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    background: #f9fafb;
    cursor: pointer;
    transition: border-color 0.2s, box-shadow 0.2s;
    appearance: auto;
}

.mijn-esim-switcher__select:focus {
    border-color: #E87A2E;
    outline: none;
    box-shadow: 0 0 0 3px rgba(232, 122, 46, 0.15);
}

/* ----------------------------------------------------------------
 *  Card grid
 * -------------------------------------------------------------- */

.mijn-esim-cards {
    display: flex;
    gap: 20px;
    margin-bottom: 30px;
}

.mijn-esim-card {
    flex: 1;
    background: #ffffff;
    border: 1px solid #e5e7eb;
    border-radius: 12px;
    padding: 24px;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
}

.mijn-esim-card__title {
    font-size: 13px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: #1e3a5f;
    margin: 0 0 16px;
}

/* -- Package card ------------------------------------------------ */

.mijn-esim-card--package {
    justify-content: center;
}

.mijn-esim-card__plan {
    font-size: 1.125rem;
    font-weight: 700;
    color: #1e3a5f;
    margin: 0 0 0.75rem;
    word-break: break-word;
}

/* ----------------------------------------------------------------
 *  Status badges
 * -------------------------------------------------------------- */

.mijn-esim-badge {
    display: inline-block;
    font-size: 13px;
    font-weight: 500;
    padding: 4px 12px;
    border-radius: 20px;
    line-height: 1.4;
}

.mijn-esim-badge--active {
    background: #d1fae5;
    color: #065f46;
}

.mijn-esim-badge--expired,
.mijn-esim-badge--error {
    background: #FEE2E2;
    color: #991B1B;
}

.mijn-esim-badge--not-activated {
    background: #FEF9C3;
    color: #854D0E;
}

.mijn-esim-badge--pending {
    background: #FFF7ED;
    color: #9A3412;
}

.mijn-esim-badge--unknown {
    background: #f3f4f6;
    color: #6b7280;
}

/* ----------------------------------------------------------------
 *  Circle diagram (GoSim-stijl blauw)
 * -------------------------------------------------------------- */

.mijn-esim-card--circle {
    padding-bottom: 1.25rem;
}

.mijn-esim-circle {
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 156px;
    height: 156px;
}

.mijn-esim-circle__svg {
    width: 100%;
    height: 100%;
    display: block;
}

.mijn-esim-circle__progress {
    transition: stroke-dashoffset 0.8s ease;
}

.mijn-esim-circle__label {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    display: flex;
    flex-direction: column;
    align-items: center;
    line-height: 1.2;
    pointer-events: none;
}

.mijn-esim-circle__value {
    font-size: 1.75rem;
    font-weight: 700;
    color: #1e3a5f;
}

.mijn-esim-circle__suffix {
    font-size: 0.875rem;
    font-weight: 600;
    color: #4A90D9;
    margin-top: 0.125rem;
}

.mijn-esim-circle__subtitle {
    font-size: 0.6875rem;
    color: #6b7280;
    margin-top: 0.375rem;
    white-space: nowrap;
}

/* ----------------------------------------------------------------
 *  Orders section (GoSim-stijl tabel)
 * -------------------------------------------------------------- */

.mijn-esim-orders {
    margin-bottom: 30px;
}

.mijn-esim-orders__title {
    font-size: 1.125rem;
    font-weight: 700;
    color: #1e3a5f;
    margin: 0 0 1rem;
}

.mijn-esim-orders__table-wrap {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}

.mijn-esim-orders__table {
    width: 100%;
    border-collapse: collapse;
    font-size: 14px;
}

.mijn-esim-orders__table thead th {
    text-align: left;
    font-weight: 500;
    color: #6b7280;
    padding: 12px 16px;
    border-bottom: 2px solid #e5e7eb;
    font-size: 14px;
    white-space: nowrap;
}

.mijn-esim-orders__table tbody td {
    padding: 16px;
    border-bottom: 1px solid #f3f4f6;
    color: #1e3a5f;
    font-size: 14px;
    vertical-align: middle;
}

.mijn-esim-orders__table tbody tr:last-child td {
    border-bottom: none;
}

.mijn-esim-orders__table tbody tr:hover {
    background: #f9fafb;
}

.mijn-esim-orders__view-link {
    color: #E87A2E;
    text-decoration: none;
    font-weight: 500;
    white-space: nowrap;
}

.mijn-esim-orders__view-link:hover {
    color: #d06a20;
    text-decoration: underline;
}

.mijn-esim-orders__empty {
    color: #6b7280;
    font-size: 0.9375rem;
    padding: 1.5rem;
    text-align: center;
    background: #f9fafb;
    border-radius: 12px;
}

/* ----------------------------------------------------------------
 *  Order status badges (GoSim-stijl)
 * -------------------------------------------------------------- */

.mijn-esim-order-status {
    display: inline-block;
    font-size: 13px;
    font-weight: 500;
    padding: 4px 12px;
    border-radius: 20px;
    line-height: 1.4;
}

.mijn-esim-order-status--completed {
    background: #d1fae5;
    color: #065f46;
}

.mijn-esim-order-status--processing {
    background: #FEF9C3;
    color: #854D0E;
}

.mijn-esim-order-status--on-hold {
    background: #FEF9C3;
    color: #854D0E;
}

.mijn-esim-order-status--pending {
    background: #FFF7ED;
    color: #9A3412;
}

.mijn-esim-order-status--cancelled {
    background: #FEE2E2;
    color: #991B1B;
}

.mijn-esim-order-status--refunded {
    background: #f3f4f6;
    color: #6b7280;
}

.mijn-esim-order-status--failed {
    background: #FEE2E2;
    color: #991B1B;
}

/* ----------------------------------------------------------------
 *  External Yesim management link
 * -------------------------------------------------------------- */

.mijn-esim-external-link {
    text-align: center;
    margin: 0 0 12px;
}

.mijn-esim-external-link__button,
.woocommerce-account a.mijn-esim-external-link__button,
.woocommerce-account .woocommerce a.mijn-esim-external-link__button {
    display: inline-flex;
    align-items: center;
    padding: 10px 24px;
    background: #f0f7ff;
    color: #1e3a5f !important;
    border: 1px solid #d1e3f6;
    border-radius: 30px;
    font-family: 'Inter', sans-serif;
    font-size: 14px;
    font-weight: 500;
    text-decoration: none;
    transition: background 0.2s, border-color 0.2s;
}

.mijn-esim-external-link__button:hover,
.woocommerce-account a.mijn-esim-external-link__button:hover,
.woocommerce-account .woocommerce a.mijn-esim-external-link__button:hover {
    background: #dbeafe;
    border-color: #93c5fd;
    color: #1e3a5f !important;
}

/* ----------------------------------------------------------------
 *  CTA button (GoSim-stijl pill)
 * -------------------------------------------------------------- */

.mijn-esim-cta {
    text-align: center;
    margin: 30px 0 1rem;
}

.mijn-esim-cta__button,
.woocommerce-account a.mijn-esim-cta__button,
.woocommerce-account .woocommerce a.mijn-esim-cta__button {
    display: inline-block;
    width: fit-content;
    padding: 14px 32px;
    background: #E87A2E;
    color: #ffffff !important;
    border-radius: 30px;
    font-family: 'Inter', sans-serif;
    font-size: 16px;
    font-weight: 600;
    text-decoration: none;
    text-align: center;
    transition: background 0.3s, transform 0.15s;
}

.mijn-esim-cta__button:hover,
.woocommerce-account a.mijn-esim-cta__button:hover,
.woocommerce-account .woocommerce a.mijn-esim-cta__button:hover {
    background: #d06a20;
    color: #ffffff !important;
    transform: translateY(-1px);
}

.mijn-esim-cta__button:active {
    transform: translateY(0);
}

/* ----------------------------------------------------------------
 *  Sidebar navigation (GoSim-stijl)
 * -------------------------------------------------------------- */

.woocommerce-account .woocommerce-MyAccount-navigation {
    background: #ffffff;
    border: 1px solid #e5e7eb;
    border-radius: 12px;
    overflow: hidden;
    margin-bottom: 1.5rem;
    padding: 0;
}

.woocommerce-account .woocommerce-MyAccount-navigation ul {
    list-style: none;
    margin: 0;
    padding: 0;
}

.woocommerce-account .woocommerce-MyAccount-navigation ul li {
    margin: 0;
}

.woocommerce-account .woocommerce-MyAccount-navigation ul li a {
    display: block;
    font-family: 'Inter', sans-serif;
    font-size: 15px;
    color: #1e3a5f;
    padding: 14px 20px;
    border-bottom: 1px solid #f3f4f6;
    text-decoration: none;
    transition: background 0.2s, color 0.2s;
}

.woocommerce-account .woocommerce-MyAccount-navigation ul li:last-child a {
    border-bottom: none;
}

.woocommerce-account .woocommerce-MyAccount-navigation ul li a:hover,
.woocommerce-account .woocommerce-MyAccount-navigation ul li.is-active a {
    background: #f0f7ff;
    color: #E87A2E;
    font-weight: 600;
}

/* ----------------------------------------------------------------
 *  Login / Register forms
 * -------------------------------------------------------------- */

.woocommerce-account .woocommerce form.woocommerce-form-login,
.woocommerce-account .woocommerce form.woocommerce-form-register {
    background: #ffffff;
    border: 1px solid #e5e7eb;
    border-radius: 12px;
    padding: 2rem;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.06);
}

.woocommerce-account .woocommerce form.woocommerce-form-login h2,
.woocommerce-account .woocommerce form.woocommerce-form-register h2 {
    font-family: 'Inter', sans-serif;
    font-size: 1.25rem;
    font-weight: 700;
    color: #1e3a5f;
    margin-bottom: 1.25rem;
}

.woocommerce-account .woocommerce form .form-row label {
    font-family: 'Inter', sans-serif;
    font-size: 0.875rem;
    font-weight: 500;
    color: #1e3a5f;
}

.woocommerce-account .woocommerce form .form-row input.input-text,
.woocommerce-account .woocommerce form .form-row input[type="email"],
.woocommerce-account .woocommerce form .form-row input[type="password"],
.woocommerce-account .woocommerce form .form-row input[type="text"] {
    width: 100% !important;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    padding: 0.75rem 1rem;
    font-family: 'Inter', sans-serif;
    font-size: 0.9375rem;
    color: #1e3a5f;
    transition: border-color 0.2s, box-shadow 0.2s;
    box-sizing: border-box;
}

.woocommerce-account .woocommerce form .form-row input.input-text:focus,
.woocommerce-account .woocommerce form .form-row input[type="email"]:focus,
.woocommerce-account .woocommerce form .form-row input[type="password"]:focus,
.woocommerce-account .woocommerce form .form-row input[type="text"]:focus {
    border-color: #E87A2E;
    outline: none;
    box-shadow: 0 0 0 3px rgba(232, 122, 46, 0.15);
}

.woocommerce-account .woocommerce form button.woocommerce-button,
.woocommerce-account .woocommerce form .button,
.woocommerce-account .woocommerce form input[type="submit"] {
    background: #E87A2E;
    color: #fff;
    border: none;
    border-radius: 8px;
    padding: 0.75rem 1.5rem;
    font-family: 'Inter', sans-serif;
    font-weight: 600;
    font-size: 0.9375rem;
    cursor: pointer;
    transition: background 0.2s;
}

.woocommerce-account .woocommerce form button.woocommerce-button:hover,
.woocommerce-account .woocommerce form .button:hover,
.woocommerce-account .woocommerce form input[type="submit"]:hover {
    background: #d06a20;
}

.woocommerce-account .woocommerce .woocommerce-LostPassword a {
    color: #E87A2E;
    font-size: 0.875rem;
    text-decoration: none;
}

.woocommerce-account .woocommerce .woocommerce-LostPassword a:hover {
    color: #d06a20;
    text-decoration: underline;
}

/* WooCommerce account tables - action links (view-order etc.) */
.woocommerce-account .woocommerce-orders-table a,
.woocommerce-account .woocommerce-MyAccount-content a {
    color: #E87A2E;
}

.woocommerce-account .woocommerce-orders-table a:hover,
.woocommerce-account .woocommerce-MyAccount-content a:hover {
    color: #d06a20;
}

/* ----------------------------------------------------------------
 *  Responsive - Tablet
 * -------------------------------------------------------------- */

@media (max-width: 900px) {
    .mijn-esim-cards {
        flex-direction: column;
        gap: 1rem;
    }

    .mijn-esim-card--circle {
        flex-direction: row;
        gap: 1.25rem;
        text-align: left;
        align-items: center;
    }

    .mijn-esim-card--circle .mijn-esim-card__title {
        position: absolute;
        top: 1.25rem;
        left: 1.25rem;
    }

    .mijn-esim-card--circle {
        position: relative;
        padding-top: 3rem;
    }

    .mijn-esim-circle {
        width: 120px;
        height: 120px;
        flex-shrink: 0;
    }

    .mijn-esim-circle__value {
        font-size: 1.375rem;
    }

    .mijn-esim-orders__table {
        font-size: 0.8125rem;
    }

    .mijn-esim-orders__table thead th,
    .mijn-esim-orders__table tbody td {
        padding: 0.625rem 0.5rem;
    }
}

/* ----------------------------------------------------------------
 *  Responsive - Mobile
 * -------------------------------------------------------------- */

@media (max-width: 600px) {
    .woocommerce-account .woocommerce {
        padding-top: 20px;
    }

    .mijn-esim-switcher {
        flex-direction: column;
        align-items: stretch;
        gap: 8px;
        padding: 12px 16px;
    }

    .mijn-esim-welcome {
        font-size: 1.25rem;
    }

    .mijn-esim-cards {
        flex-direction: column;
    }

    .mijn-esim-card {
        padding: 1.25rem;
        border-radius: 12px;
    }

    .mijn-esim-card--circle {
        flex-direction: column;
        text-align: center;
        padding-top: 1.25rem;
    }

    .mijn-esim-card--circle .mijn-esim-card__title {
        position: static;
    }

    .mijn-esim-circle {
        width: 140px;
        height: 140px;
    }

    .mijn-esim-circle__value {
        font-size: 1.5rem;
    }

    .mijn-esim-orders__title {
        font-size: 1rem;
    }

    /* Stack table on mobile */
    .mijn-esim-orders__table thead {
        display: none;
    }

    .mijn-esim-orders__table tbody tr {
        display: block;
        background: #fff;
        border: 1px solid #e5e7eb;
        border-radius: 12px;
        padding: 1rem;
        margin-bottom: 0.75rem;
    }

    .mijn-esim-orders__table tbody td {
        display: flex;
        justify-content: space-between;
        align-items: center;
        padding: 0.375rem 0;
        border-bottom: none;
    }

    .mijn-esim-orders__table tbody td::before {
        content: attr(data-label);
        font-weight: 600;
        color: #6b7280;
        font-size: 0.75rem;
        text-transform: uppercase;
        margin-right: 0.75rem;
    }

    .mijn-esim-cta__button {
        display: block;
        text-align: center;
        padding: 0.875rem 1.5rem;
        border-radius: 30px;
    }

    .woocommerce-account .woocommerce form.woocommerce-form-login,
    .woocommerce-account .woocommerce form.woocommerce-form-register {
        padding: 1.25rem;
        border-radius: 12px;
    }

    .woocommerce-account .woocommerce-MyAccount-navigation {
        border-radius: 12px;
    }
}

/* ----------------------------------------------------------------
 *  Responsive - Small mobile
 * -------------------------------------------------------------- */

@media (max-width: 380px) {
    .mijn-esim-welcome {
        font-size: 1.125rem;
    }

    .mijn-esim-circle {
        width: 120px;
        height: 120px;
    }

    .mijn-esim-circle__value {
        font-size: 1.25rem;
    }

    .mijn-esim-circle__subtitle {
        font-size: 0.625rem;
    }
}
