/* MyArea Blazor — Rabona theme
   Porting fedele dello style.css originale con focus mobile-first.
   Conserva classi/colori/effetti dell'app HTML legacy.
*/

/* === TOKENS === */
:root {
    --rabona-primary: #118b50;
    --rabona-primary-dark: #0d6b3c;
    --rabona-secondary: #e2eb98;
    --rabona-dark: #2d2d36;
    --rabona-light: #faf7f7;
    --rabona-error: #BB0000;
    --rabona-orange: #ff8c00;
    --rabona-text: #333;
}

/* === GLOBAL === */
*,
*::before,
*::after {
    box-sizing: border-box;
}

h1, h2, h3, h4, h5, h6 {
    outline: none;
}

html, body {
    overscroll-behavior-x: none;
    touch-action: pan-y;
    overflow-x: hidden !important;
    height: 100%;
    min-height: 100vh;
    margin: 0;
    padding: 0;
    font-family: 'Roboto', 'Poppins', sans-serif !important;
    background-color: #fff;
    color: var(--rabona-text);
    font-size: 16px;
}

@media only screen and (min-width: 600px) {
    html, body {
        font-size: 17px;
    }
}

button {
    border-radius: 100px !important;
    font-family: 'Roboto', sans-serif;
}

a {
    color: var(--rabona-primary);
}

/* === BLAZOR ERROR UI === */
#blazor-error-ui {
    background: lightyellow;
    bottom: 0;
    box-shadow: 0 -1px 2px rgba(0, 0, 0, 0.2);
    display: none;
    left: 0;
    padding: 0.6rem 1.25rem 0.7rem 1.25rem;
    position: fixed;
    width: 100%;
    z-index: 1000;
}

#blazor-error-ui .dismiss {
    cursor: pointer;
    position: absolute;
    right: 0.75rem;
    top: 0.5rem;
}

/* === LAYOUT === */
.page-content {
    padding: 16px 12px;
    text-align: center;
    margin-bottom: 70px; /* spazio per la tabbar */
}

@media only screen and (min-width: 600px) {
    .page-content {
        padding: 20px;
        margin-bottom: 0;
    }
}

main, #main {
    width: 100%;
    margin: auto;
    min-width: 250px;
}

@media only screen and (min-width: 1024px) {
    #main, .page-content {
        margin-top: 70px;
    }
}

/* === TYPOGRAPHY === */
.Welcome {
    font-family: 'Poppins', sans-serif;
    text-align: left;
    font-size: 28px !important;
    font-weight: 600;
    margin-bottom: 20px;
    color: var(--rabona-primary);
    outline: none;
}

.Welcome2 {
    text-align: center;
    font-size: 14px !important;
    margin-bottom: 20px;
    color: var(--rabona-primary);
}

.Welcome3 {
    text-align: center;
    font-size: 22px !important;
    margin-bottom: 20px;
    color: var(--rabona-primary);
    font-weight: 600;
}

.Welcome4 {
    text-align: center;
    font-size: 18px !important;
    margin-bottom: 20px;
    color: var(--rabona-primary);
    font-weight: 600;
}

@media only screen and (min-width: 600px) {
    .Welcome  { font-size: 30px !important; }
    .Welcome3 { font-size: 28px !important; }
    .Welcome4 { font-size: 20px !important; }
}

.WelcomeSub {
    text-align: left;
    color: var(--rabona-text);
    font-weight: 400;
    font-size: 16px;
    margin-bottom: 20px;
}

.nome3 {
    font-family: 'Poppins', sans-serif;
    font-weight: 600;
    font-size: 1.25em;
    color: var(--rabona-primary);
    padding-bottom: 20px;
    text-align: center;
}

/* === LOGIN === */
#div_login, .login {
    max-width: 600px;
    margin: 0 auto;
    padding: 20px;
}

.table-form {
    display: grid;
    gap: 16px;
    max-width: 600px;
    margin: 20px auto;
    box-sizing: border-box;
}

.row {
    display: block;
}

.input-container {
    position: relative;
    margin-bottom: 16px;
    width: 100%;
}

.fluid {
    display: flex;
    justify-content: center;
}

.button-login {
    transition: all 0.3s ease-in-out;
    display: inline-block;
    text-align: center;
    color: #fff;
    font-size: 16px;
    background: linear-gradient(135deg, var(--rabona-primary), var(--rabona-secondary));
    border-radius: 100px;
    padding: 12px 30px;
    border: none;
    cursor: pointer;
    width: 100%;
    max-width: 320px;
    font-weight: 500;
    box-shadow: 0 4px 12px rgba(17, 139, 80, 0.3);
}

.button-login:hover {
    box-shadow: 0 6px 18px rgba(17, 139, 80, 0.45);
    transform: translateY(-1px);
}

.button-login:disabled {
    background: #ccc;
    color: #666;
    cursor: not-allowed;
    box-shadow: none;
}

/* === GENERIC BUTTONS === */
.button-choice,
.button-extra-color2 {
    transition: all 0.3s ease;
    background-color: var(--rabona-primary);
    color: #fff;
    border: 2px solid var(--rabona-primary);
    border-radius: 6px;
    padding: 10px 24px;
    font-size: 14px;
    cursor: pointer;
    box-shadow: 0 4px 19px rgba(226, 235, 152, 0.8);
}

.button-choice:hover,
.button-extra-color2:hover {
    background-color: #1fac76;
    border-color: #1fac76;
}

.button-extra-color1 {
    transition: all 0.3s ease;
    font-size: 14px;
    background-color: #fff;
    color: var(--rabona-text);
    border: 2px solid var(--rabona-primary);
    border-radius: 6px;
    padding: 10px 24px;
    cursor: pointer;
}

.button-extra-color1:hover {
    background-color: rgba(17, 139, 80, 0.08);
}

.button-extra-color-info {
    transition: all 0.3s ease;
    font-size: 14px;
    background-color: #fff;
    color: var(--rabona-text);
    border: 2px solid var(--rabona-primary);
    border-radius: 6px;
    padding: 12px 24px;
    cursor: pointer;
}

.button-extra-color-info:hover {
    background-color: rgba(17, 139, 80, 0.08);
}

.button-backstep {
    background: #9e9e9e;
    color: white;
    border: none;
    padding: 10px 24px;
    font-size: 14px;
    border-radius: 6px;
    cursor: pointer;
}

.button-backstep:hover {
    background: #757575;
}

.button-buy-sim {
    color: var(--rabona-primary);
    background-color: #fff;
    border: 2px solid var(--rabona-primary);
    padding: 10px 24px;
    font-size: 16px;
    border-radius: 6px;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    font-weight: bold;
    gap: 8px;
}

.button-submit-select {
    transition: all 0.3s ease;
    background-color: var(--rabona-primary);
    width: auto;
    min-width: 120px;
    padding: 12px 22px;
    cursor: pointer;
    color: #fff;
    border-radius: 6px;
    border: none;
    margin-top: 10px;
}

.button-submit-select:disabled {
    background-color: #ccc;
    color: #666;
    cursor: not-allowed;
}

.user-logout {
    background-color: transparent;
    color: var(--rabona-primary);
    border: 2px solid var(--rabona-primary);
    border-radius: 100px;
    padding: 10px 24px;
    font-size: 16px;
    cursor: pointer;
    margin-top: 8px;
}

.user-logout:hover {
    background-color: var(--rabona-primary);
    color: #fff;
}

.button-support {
    background-color: #fff;
    border: 2px solid var(--rabona-primary);
    color: var(--rabona-primary);
    padding: 10px 24px;
    font-size: 16px;
    border-radius: 6px;
    cursor: pointer;
    font-weight: bold;
}

/* === TABBAR (mobile bottom nav) === */
.gb-tabbar {
    position: fixed;
    bottom: 0;
    left: 0;
    width: 100%;
    background-color: #fff;
    display: flex;
    justify-content: space-around;
    padding: 12px 0 22px;
    border-top: 2px solid #ddd;
    box-shadow: 0px -2px 5px rgba(0, 0, 0, 0.1);
    z-index: 999;
    padding-bottom: calc(22px + env(safe-area-inset-bottom, 0px));
}

.gb-tabbar-item {
    text-decoration: none;
    color: var(--rabona-primary);
    font-size: 12px;
    text-align: center;
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
    transition: color 0.2s ease-in-out;
    cursor: pointer;
}

.gb-tabbar-item i {
    font-size: 18px;
}

.gb-tabbar-item.active {
    color: var(--rabona-dark);
    font-weight: 600;
}

.gb-tabbar-item:hover {
    color: var(--rabona-primary-dark);
}

.span-nav {
    font-size: 12px;
    font-family: 'Roboto', sans-serif;
}

@media only screen and (min-width: 1024px) {
    .gb-tabbar {
        display: none;
    }
}

/* === DESKTOP NAV === */
.navbar-desktop {
    display: none;
}

@media (min-width: 1024px) {
    .navbar-desktop {
        display: block;
    }
}

/* === AREA / CARD === */
.logged {
    width: 100%;
    max-width: 1024px;
    background-color: #fff;
    margin: 0 auto 15px;
    border-radius: 10px;
    padding: 10px 0;
}

.select-container {
    position: relative;
    display: flex;
    align-items: center;
    margin: 12px auto;
    max-width: 400px;
    padding: 0 12px;
}

.area-profile-container {
    display: flex;
    justify-content: flex-end;
    padding: 0 12px;
}

.area-profile {
    width: 36px;
    height: 36px;
    background: #e8f5e9;
    border: 1px solid var(--rabona-primary);
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    cursor: pointer;
}

.area-profile i {
    font-size: 18px;
    color: var(--rabona-primary);
}

.input-box-logged {
    border-radius: 20px;
    border: 1px solid #bbb7b7;
    margin: 10px 0;
    padding: 8px 14px;
    flex: 1;
    font-size: 16px;
    background: #fff;
}

.input-box-logged:focus {
    outline: none;
    border-color: var(--rabona-primary);
}

.edit-icon {
    background: none;
    border: none;
    cursor: pointer;
    color: var(--rabona-primary);
    font-size: 16px;
    margin-left: 12px;
}

.card-area {
    margin: 15px auto 25px;
    background: #fff;
    border: 2px solid var(--rabona-primary);
    border-radius: 20px;
    transition: all 0.3s ease;
    padding: 18px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.08),
                0 2px 10px rgba(17, 139, 80, 0.25),
                0 4px 20px rgba(226, 235, 152, 0.3);
    width: 94%;
    max-width: 1100px;
}

.card-area.hidden {
    display: none;
}

.promo-container {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
    justify-content: center;
}

.cellulare {
    width: 42px;
    height: auto;
}

.balance {
    padding: 4px 8px;
    font-size: 16px;
    color: var(--rabona-text);
    font-weight: 500;
}

.balance2 {
    font-size: 18px;
    font-weight: bold;
    margin-top: 12px;
    color: var(--rabona-primary);
}

.promo-date {
    font-size: 14px;
    color: var(--rabona-text);
    text-align: center;
}

.container-info,
.container-quick-info,
.container-info-banner {
    width: 100%;
    max-width: 800px;
    margin: 15px auto;
    padding: 10px 16px;
}

.container-info {
    margin-top: 20px !important;
}

.container-info-banner {
    margin-top: 10px !important;
}

.container-quick-info {
    margin-top: 0 !important;
}

.quick-info-button {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    align-items: center;
    gap: 12px;
    margin-top: 16px;
}

.container-extra-sector {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    align-items: center;
    gap: 12px;
    margin-top: 10px;
}

@media only screen and (min-width: 600px) {
    .container-extra-sector {
        gap: 30px;
    }
}

/* === BANNER BUY eSIM === */
.banner-container {
    background-image: url('../images/buyesim.png');
    background-repeat: no-repeat;
    background-size: cover;
    background-position: center;
    border-radius: 8px;
    width: 94%;
    max-width: 600px;
    padding: 32px;
    text-align: right;
    margin: 20px auto 30px;
    min-height: 130px;
    display: flex;
    align-items: center;
    justify-content: flex-end;
}

#banner-support {
    background-image: url('../images/611.png');
    background-repeat: no-repeat;
    background-size: cover;
    background-position: center;
    border-radius: 8px;
    width: 94%;
    max-width: 600px;
    padding: 32px;
    text-align: right;
    margin: 20px auto 30px;
    min-height: 130px;
    display: flex;
    align-items: center;
    justify-content: flex-end;
}

/* === USAGE GAUGES === */
.counter-table {
    margin: 12px auto;
    width: 100%;
    max-width: 600px;
    display: flex;
    justify-content: space-around;
    flex-wrap: wrap;
    gap: 12px;
}

.counter-cell {
    flex: 1 1 28%;
    min-width: 100px;
    text-align: center;
}

.counter-connect {
    margin-top: 8px;
    font-weight: bold;
    color: var(--rabona-text);
    font-size: 14px;
}

/* === ACCORDION === */
.myarea-accordion-container,
.myarea-accordion-container-faq {
    width: 94%;
    max-width: 1024px;
    margin: 15px auto 25px;
    background: #fff;
    border: 2px solid var(--rabona-primary);
    border-radius: 20px;
    transition: all 0.3s ease;
    padding: 16px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.08),
                0 2px 10px rgba(17, 139, 80, 0.25),
                0 4px 20px rgba(226, 235, 152, 0.3);
}

.myarea-accordion-item {
    border-bottom: 1px solid #eaeaea;
}

.myarea-accordion-item:last-child {
    border-bottom: none;
}

.myarea-accordion-header {
    display: flex;
    align-items: center;
    cursor: pointer;
    padding: 14px 8px;
    border-radius: 5px;
    transition: background 0.3s ease;
}

.myarea-accordion-header:hover {
    background: rgba(17, 139, 80, 0.05);
}

.myarea-accordion-header h3 {
    flex-grow: 1;
    margin: 0;
    font-size: 16px;
    font-weight: 600;
    color: var(--rabona-text);
    text-align: left;
}

.myarea-icon {
    width: 38px;
    height: 38px;
    background: #e8f5e9;
    border: 1px solid var(--rabona-primary);
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    margin-right: 12px;
    flex: 0 0 auto;
}

.myarea-icon i {
    font-size: 18px;
    color: var(--rabona-primary);
}

.myarea-arrow {
    margin-left: auto;
    transition: transform 0.3s ease;
    color: #666;
}

.myarea-accordion-item.open .myarea-arrow {
    transform: rotate(180deg);
}

.myarea-accordion-content {
    max-height: 0;
    overflow: hidden;
    padding: 0 12px;
    transition: max-height 0.3s ease, padding 0.3s ease;
    text-align: left;
}

.myarea-accordion-item.open .myarea-accordion-content {
    max-height: 600px;
    padding: 8px 12px 16px;
}

.myarea-accordion-content p,
.myarea-accordion-content label {
    margin: 5px 0;
    font-size: 15px;
    color: var(--rabona-text);
}

.myarea-accordion-content label {
    font-weight: 600;
    margin-right: 6px;
}

.myarea-input {
    width: 100%;
    padding: 10px;
    margin: 6px 0;
    border: 1px solid #ccc;
    border-radius: 8px;
    font-size: 15px;
}

.myarea-input:focus {
    outline: none;
    border-color: var(--rabona-primary);
    box-shadow: 0 0 0 3px rgba(17, 139, 80, 0.15);
}

/* === PROFILE === */
.container-welcome {
    display: flex;
    justify-content: center;
    align-items: center;
    flex-direction: column;
    margin: 20px auto;
    max-width: 700px;
    text-align: center;
}

.profile-container {
    display: flex;
    justify-content: center;
    align-items: center;
    margin-top: 6px;
}

.profile-wrapper {
    position: relative;
}

.profile-img {
    width: 110px;
    height: 110px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid #ddd;
    box-shadow: 0px 4px 8px rgba(0, 0, 0, 0.15);
}

.edit-icon-profile {
    position: absolute;
    bottom: 4px;
    right: 4px;
    background: var(--rabona-primary);
    color: white;
    width: 30px;
    height: 30px;
    display: flex;
    justify-content: center;
    align-items: center;
    border-radius: 50%;
    cursor: pointer;
    box-shadow: 0px 2px 5px rgba(0, 0, 0, 0.2);
    font-size: 14px;
}

.edit-icon-profile input {
    display: none;
}

.logout-container {
    display: flex;
    justify-content: center;
    align-items: center;
    margin: 20px auto;
    width: 100%;
}

/* === PLAN CARDS === */
.plan-container {
    display: grid;
    grid-template-columns: 1fr;
    gap: 18px;
    margin: 20px auto;
    width: 94%;
    max-width: 800px;
}

@media only screen and (min-width: 600px) {
    .plan-container {
        grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
        gap: 24px;
        max-width: 1024px;
    }
}

.plan-card {
    background: #fff;
    border: 2px solid #9e9e9e;
    border-radius: 12px;
    transition: all 0.3s ease;
    padding: 16px;
    cursor: pointer;
    position: relative;
}

.plan-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 4px 18px rgba(17, 139, 80, 0.25);
}

.plan-card.selected,
.plan-card.open {
    border-color: var(--rabona-primary);
    border-width: 3px;
    background: #f0faf5;
    box-shadow: 0 6px 24px rgba(17, 139, 80, 0.35),
                0 0 0 4px rgba(17, 139, 80, 0.12);
    transform: translateY(-2px);
}

.plan-card.selected::after,
.plan-card.open::after {
    content: '✓';
    position: absolute;
    top: -13px;
    right: -13px;
    width: 28px;
    height: 28px;
    background: var(--rabona-primary);
    color: #fff;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 15px;
    font-weight: 700;
    box-shadow: 0 2px 8px rgba(17, 139, 80, 0.45);
    line-height: 28px;
    text-align: center;
}

.plan-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.plan-offer {
    color: var(--rabona-primary);
    font-size: 1.25em;
    font-weight: 600;
}

.plan-data {
    font-size: 1em;
    color: var(--rabona-text);
    margin-top: 4px;
}

.plan-price {
    font-size: 1.15em;
    font-weight: 700;
    color: var(--rabona-dark);
    margin-top: 4px;
}

.plan-taxes,
.plan-card .month {
    color: #757575;
    font-size: 0.85em;
    margin-top: -4px;
}

.plan-includes ul {
    padding-left: 20px;
    margin: 8px 0 0;
    list-style: none;
}

.plan-includes ul li::before {
    content: '✓ ';
    color: var(--rabona-primary);
    font-weight: bold;
    margin-right: 6px;
}

/* === CHECKOUT === */
.checkout-box {
    width: 94%;
    max-width: 500px;
    margin: 0 auto;
    padding: 20px;
    border-radius: 10px;
    background-color: #fff;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.12);
    text-align: left;
}

.checkout-row {
    display: flex;
    justify-content: space-between;
    margin-bottom: 8px;
    font-size: 14px;
}

.checkout-label {
    font-weight: 600;
    color: var(--rabona-text);
}

.checkout-total-box {
    margin: 16px auto 25px;
    padding: 12px 16px;
    border: 2px solid var(--rabona-primary);
    border-radius: 5px;
    display: flex;
    justify-content: space-between;
    background-color: #f9fff9;
    width: 100%;
    max-width: 500px;
    font-weight: 700;
}

.checkout-total-value {
    color: var(--rabona-primary);
    font-size: 1.1em;
}

/* === SUCCESS PAGE === */
.success-image {
    width: 160px;
    margin: 20px auto;
    display: block;
}

.success-message {
    font-size: 1.05em;
    text-align: center;
    margin: 0 0 10px;
}

.secondary-text {
    font-size: 0.9em;
    color: #757575;
    margin: 0 0 20px;
    text-align: center;
}

/* === STEPPER === */
.steps-list {
    list-style: none;
    padding: 0;
    margin: 0;
    text-align: left;
}

.steps-list li {
    display: flex;
    align-items: center;
    margin-bottom: 12px;
    padding: 10px;
    border-left: 3px solid var(--rabona-primary);
    background: #f9f9f9;
    border-radius: 6px;
}

.step-icon {
    color: var(--rabona-primary);
    font-size: 1.4em;
    margin-right: 10px;
}

/* === FOOTER === */
.footer-general,
.footer-general2 {
    width: 95%;
    max-width: 1280px;
    text-align: center;
    margin: auto;
    padding: 12px 0 24px;
}

.paragraph {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    align-items: center;
    gap: 6px;
    font-size: 13px;
    color: grey;
    margin: 12px 0 24px;
}

.paragraph a {
    color: grey;
    text-decoration: underline;
}

.paragraph a:hover {
    color: darkgrey;
}

.app-button {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 10px;
    margin: 12px 0 20px;
    flex-wrap: wrap;
}

.app-button img {
    height: 44px;
    width: auto;
}

.cc-pay {
    text-align: center;
    margin: 8px auto 16px;
}

.cc-pay img {
    max-width: 92%;
    height: auto;
}

hr {
    border: none;
    border-top: 1px solid rgb(227, 227, 227);
    margin: 16px 0;
}

/* === UTILITY === */
.spazio-box {
    height: 100px;
    width: 100%;
}

@media only screen and (min-width: 1024px) {
    .spazio-box {
        display: none;
    }
}

.hidden {
    display: none !important;
}

.visible {
    display: block !important;
}

/* === MUDBLAZOR THEME OVERRIDES === */
/* Allinea i componenti MudBlazor al theme Rabona quando sono usati */
.mud-button-filled.mud-button-filled-primary,
.mud-button-filled.mud-button-filled-secondary {
    border-radius: 100px !important;
    text-transform: none !important;
}

.mud-paper {
    border-radius: 12px;
}

.mud-card.plan-card {
    border-radius: 12px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.08);
}

.mud-card.plan-card.selected {
    border: 2px solid var(--rabona-primary) !important;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.08),
                0 2px 10px rgba(17, 139, 80, 0.4),
                0 4px 20px rgba(226, 235, 152, 0.3) !important;
}

/* Loading Blazor */
.loading-progress {
    display: block;
    width: 5rem;
    height: 5rem;
}

.loading-progress circle {
    fill: none;
    stroke: #e8e8e8;
    stroke-width: 0.4rem;
    transform-origin: 50% 50%;
    transform: rotate(-90deg);
}

.loading-progress circle:last-child {
    stroke: var(--rabona-primary);
    stroke-dasharray: calc(3.141 * var(--blazor-load-percentage, 0%) * 0.8), 500%;
    transition: stroke-dasharray 0.05s ease-in-out;
}

.loading-progress-text {
    margin-top: 0.75rem;
    font-family: 'Poppins', sans-serif;
    font-size: 0.85rem;
    color: #888;
    text-align: center;
}

.loading-progress-text:after {
    content: var(--blazor-load-percentage-text, "Loading");
}

code {
    color: #c02d76;
}
