/* Nobi Mobile - Main Stylesheet */
:root {
    --nobi-red: #DA291C;
    --nobi-dark: #1A1A1A;
    --nobi-gray: #F5F5F7;
    --nobi-text: #333333;
    --nobi-border: #E0E0E0;
    --nobi-success: #2E7D32;
    --nobi-accent: #E53935;
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}

body {
    background-color: var(--nobi-gray);
    color: var(--nobi-text);
    line-height: 1.6;
}

header {
    background-color: #ffffff;
    border-bottom: 1px solid var(--nobi-border);
    position: sticky;
    top: 0;
    z-index: 1000;
}

.nav-container {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 20px;
}

.logo {
    font-size: 24px;
    font-weight: 800;
    color: var(--nobi-red);
    text-decoration: none;
    letter-spacing: -0.5px;
}

.logo span {
    color: var(--nobi-dark);
}

.nav-menu {
    display: flex;
    list-style: none;
    gap: 25px;
}

.nav-menu a {
    text-decoration: none;
    color: var(--nobi-dark);
    font-weight: 600;
    font-size: 15px;
    transition: color 0.2s;
}

.nav-menu a:hover {
    color: var(--nobi-red);
}

.nav-auth {
    display: flex;
    align-items: center;
    gap: 15px;
}

.btn-nav-login {
    text-decoration: none;
    color: var(--nobi-dark);
    font-weight: 600;
    font-size: 15px;
}

.btn-nav-signup {
    text-decoration: none;
    background-color: var(--nobi-red);
    color: #ffffff !important;
    padding: 8px 18px;
    border-radius: 20px;
    font-weight: 600;
    font-size: 14px;
    transition: background-color 0.2s;
}

.btn-nav-signup:hover {
    background-color: #B21F16;
}

.hero {
    background-color: var(--nobi-dark);
    color: #ffffff;
    padding: 80px 20px;
    text-align: center;
}

.hero-content {
    max-width: 800px;
    margin: 0 auto;
}

.hero-content h1 {
    font-size: 48px;
    margin-bottom: 20px;
    font-weight: 800;
}

.hero-content p {
    font-size: 18px;
    margin-bottom: 30px;
    opacity: 0.9;
}

.btn-hero {
    display: inline-block;
    background-color: var(--nobi-red);
    color: white;
    text-decoration: none;
    padding: 12px 30px;
    border-radius: 25px;
    font-weight: bold;
    transition: background-color 0.2s;
}

.btn-hero:hover {
    background-color: #B21F16;
}

.container {
    max-width: 1200px;
    margin: 40px auto;
    padding: 0 20px;
}

.plans-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 30px;
    margin-top: 40px;
}

.plan-card {
    background: #ffffff;
    border: 1px solid var(--nobi-border);
    border-radius: 12px;
    padding: 30px;
    text-align: left;
    position: relative;
    overflow: hidden;
    transition: transform 0.2s, box-shadow 0.2s;
}

.plan-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 20px rgba(0,0,0,0.05);
}

.plan-card.popular {
    border: 2px solid var(--nobi-red);
}

.plan-badge {
    position: absolute;
    top: 15px;
    right: 15px;
    background-color: var(--nobi-red);
    color: white;
    padding: 3px 10px;
    font-size: 11px;
    font-weight: bold;
    border-radius: 10px;
    text-transform: uppercase;
}

.plan-title {
    font-size: 20px;
    font-weight: 700;
    margin-bottom: 10px;
}

.plan-price {
    font-size: 36px;
    font-weight: 800;
    margin: 15px 0;
    color: var(--nobi-dark);
}

.plan-price span {
    font-size: 16px;
    font-weight: 400;
    color: #666;
}

.plan-features {
    list-style: none;
    margin: 25px 0;
}

.plan-features li {
    margin-bottom: 12px;
    font-size: 14px;
    display: flex;
    align-items: center;
}

.plan-features li::before {
    content: "✓";
    color: var(--nobi-red);
    font-weight: bold;
    margin-right: 10px;
}

.btn-plan {
    display: block;
    width: 100%;
    text-align: center;
    background-color: var(--nobi-dark);
    color: white;
    text-decoration: none;
    padding: 12px;
    border-radius: 6px;
    font-weight: 600;
    transition: background-color 0.2s;
}

.btn-plan:hover {
    background-color: var(--nobi-red);
}

.card {
    background: #ffffff;
    border-radius: 12px;
    padding: 30px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.03);
    border: 1px solid var(--nobi-border);
    margin-bottom: 30px;
}

.grid-dashboard {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 30px;
}

@media (max-width: 900px) {
    .grid-dashboard {
        grid-template-columns: 1fr;
    }
}

.usage-box {
    margin: 20px 0;
}

.progress-bar-container {
    background-color: #E0E0E0;
    border-radius: 10px;
    height: 12px;
    width: 100%;
    overflow: hidden;
    margin: 8px 0;
}

.progress-bar {
    background-color: var(--nobi-red);
    height: 100%;
    border-radius: 10px;
    transition: width 0.3s;
}

.usage-details {
    display: flex;
    justify-content: space-between;
    font-size: 13px;
    color: #666;
}

form {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 5px;
}

label {
    font-weight: 600;
    font-size: 14px;
}

input[type="text"],
input[type="email"],
input[type="password"],
select {
    padding: 10px 15px;
    border: 1px solid var(--nobi-border);
    border-radius: 6px;
    font-size: 15px;
}

input:focus, select:focus {
    outline: none;
    border-color: var(--nobi-red);
}

.btn-primary {
    background-color: var(--nobi-red);
    color: white;
    border: none;
    padding: 12px;
    border-radius: 6px;
    font-size: 16px;
    font-weight: bold;
    cursor: pointer;
    transition: background-color 0.2s;
}

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

.btn-secondary {
    background-color: #eeeeee;
    color: #333333;
    border: none;
    padding: 12px;
    border-radius: 6px;
    font-size: 16px;
    font-weight: bold;
    cursor: pointer;
}

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

.alert {
    padding: 12px;
    border-radius: 6px;
    margin-bottom: 20px;
    font-size: 14px;
}

.alert-success {
    background-color: #E8F5E9;
    color: var(--nobi-success);
    border: 1px solid #C8E6C9;
}

.alert-danger {
    background-color: #FFEBEE;
    color: var(--nobi-red);
    border: 1px solid #FFCDD2;
}

footer {
    background-color: var(--nobi-dark);
    color: #999;
    padding: 50px 20px;
    text-align: center;
    margin-top: 80px;
    font-size: 14px;
}

footer p {
    margin-bottom: 10px;
}

footer a {
    color: #ccc;
    text-decoration: none;
    margin: 0 10px;
}

footer a:hover {
    color: var(--nobi-red);
}


/* Checkout layout and styling */
.checkout-container {
    display: grid;
    grid-template-columns: 1.5fr 1fr;
    gap: 40px;
    margin-top: 40px;
}

@media (max-width: 900px) {
    .checkout-container {
        grid-template-columns: 1fr;
    }
}

.order-summary-box {
    background-color: #fafafa;
    border-radius: 12px;
    border: 1px solid var(--nobi-border);
    padding: 30px;
    position: sticky;
    top: 100px;
}

/* Apple Pay Simulated Native Sheet Drawer */
.apple-pay-sheet-backdrop {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(0, 0, 0, 0.4);
    z-index: 10000;
    justify-content: center;
    align-items: flex-end; /* Slides up from the bottom */
}

.apple-pay-sheet {
    background: #f4f4f7;
    width: 100%;
    max-width: 600px;
    border-top-left-radius: 16px;
    border-top-right-radius: 16px;
    box-shadow: 0 -10px 25px rgba(0,0,0,0.15);
    animation: slideUp 0.35s cubic-bezier(0.25, 1, 0.5, 1) forwards;
    color: #1c1c1e;
    font-family: -apple-system, SF Pro Text, sans-serif;
    overflow: hidden;
}

@keyframes slideUp {
    from {
        transform: translateY(100%);
    }
    to {
        transform: translateY(0);
    }
}

.apple-pay-header {
    background: #ffffff;
    padding: 18px 24px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid #e5e5ea;
}

.apple-pay-title {
    font-size: 18px;
    font-weight: 700;
    color: #000;
}

.apple-pay-body {
    padding: 10px 24px 24px 24px;
}

.apple-pay-row {
    display: flex;
    justify-content: space-between;
    padding: 16px 0;
    border-bottom: 1px solid #e5e5ea;
    font-size: 15px;
}

.apple-pay-row-title {
    color: #8e8e93;
    font-weight: 500;
    min-width: 120px;
}

.apple-pay-row-val {
    color: #000000;
    text-align: right;
    font-weight: 600;
}

.apple-pay-total {
    display: flex;
    justify-content: space-between;
    padding: 20px 0;
    font-size: 22px;
    font-weight: 800;
    color: #000;
}

.btn-apple-pay-confirm {
    background-color: #000000;
    color: #ffffff;
    width: 100%;
    padding: 16px;
    border-radius: 12px;
    font-size: 17px;
    font-weight: 700;
    border: none;
    cursor: pointer;
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 8px;
    transition: background-color 0.2s;
}

.btn-apple-pay-confirm:hover {
    background-color: #1c1c1e;
}

/* Spinner */
.apple-spinner {
    border: 3px solid rgba(255,255,255,0.3);
    border-radius: 50%;
    border-top: 3px solid #fff;
    width: 20px;
    height: 20px;
    animation: appleSpin 0.8s linear infinite;
}

@keyframes appleSpin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.progress-bar-fill {
    background-color: var(--nobi-red);
    height: 100%;
    border-radius: 10px;
}

.dashboard-grid {
    display: grid;
    grid-template-columns: 1.2fr 1fr;
    gap: 30px;
}

@media (max-width: 900px) {
    .dashboard-grid {
        grid-template-columns: 1fr;
    }
}
