/* Apple-inspired Minimal Light Theme */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700;800&display=swap');

:root {
    --bg-dark: #f5f5f7; /* Apple signature light grey */
    --bg-card: #ffffff;
    --border-color: #d2d2d7;
    --border-hover: #86868b;
    --text-primary: #1d1d1f; /* Apple primary text */
    --text-secondary: #6e6e73; /* Apple secondary text */
    --text-muted: #86868b;
    
    --primary: #0071e3; /* Apple active blue */
    --primary-gradient: #0071e3;
    --featured-gradient: #1d1d1f;
    --bg-gradient: none;
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    background-color: var(--bg-dark);
    color: var(--text-primary);
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "Inter", sans-serif;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    align-items: center;
    padding: 2rem 1rem;
}

/* Container */
.container {
    width: 100%;
    max-width: 900px;
    margin: 0 auto;
    z-index: 10;
}

/* Header */
header {
    text-align: center;
    margin-bottom: 2rem;
}

.logo {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 0.75rem;
    text-decoration: none;
}

.logo-icon-img {
    height: 32px;
    width: 32px;
    object-fit: contain;
    border-radius: 6px;
}

.logo-text-img {
    height: 20px;
    object-fit: contain;
}

header p {
    color: var(--text-secondary);
    font-size: 0.95rem;
    max-width: 500px;
    margin: 0 auto;
    line-height: 1.4;
    font-weight: 400;
}

/* Main Form Wrapper */
.payment-wrapper {
    background: var(--bg-card);
    border-radius: 16px;
    padding: 2rem;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.04);
}

@media (max-width: 600px) {
    body {
        padding: 1rem 0.5rem;
    }
    .payment-wrapper {
        padding: 1.25rem;
    }
}

/* Plans Grid - 3 Columns for compact sizing */
.plans-grid {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
    gap: 0.85rem;
    margin-bottom: 2rem;
}

@media (max-width: 768px) {
    .plans-grid {
        grid-template-columns: 1fr;
        gap: 0.75rem;
    }
}

.plan-card {
    position: relative;
    background: #ffffff;
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 1.25rem;
    cursor: pointer;
    transition: all 0.15s ease-in-out;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.plan-card:hover {
    border-color: var(--border-hover);
    transform: translateY(-1px);
}

.plan-card.selected {
    border-color: var(--primary);
    border-width: 2px;
    padding: calc(1.25rem - 1px); /* Prevent layout shifts */
    background: rgba(0, 113, 227, 0.01);
}

.plan-badge {
    position: absolute;
    top: -10px;
    right: 12px;
    background: #e8f0fe;
    color: var(--primary);
    font-size: 0.65rem;
    font-weight: 700;
    padding: 2px 8px;
    border-radius: 8px;
    text-transform: uppercase;
    letter-spacing: 0.02em;
}

.plan-name {
    font-size: 0.95rem;
    font-weight: 600;
    margin-bottom: 0.25rem;
    color: var(--text-primary);
}

.plan-price {
    font-size: 1.6rem;
    font-weight: 700;
    margin-bottom: 1rem;
    color: var(--text-primary);
    display: flex;
    align-items: baseline;
}

.plan-price span {
    font-size: 0.8rem;
    color: var(--text-secondary);
    font-weight: 400;
    margin-left: 2px;
}

.plan-features {
    list-style: none;
    text-align: left;
    border-top: 1px solid #f5f5f7;
    padding-top: 1rem;
}

.plan-features li {
    font-size: 0.8rem;
    color: var(--text-secondary);
    margin-bottom: 0.5rem;
    display: flex;
    align-items: center;
    gap: 0.3rem;
    line-height: 1.3;
}

.plan-features li:last-child {
    margin-bottom: 0;
}

.plan-features li::before {
    content: "✓";
    color: var(--primary);
    font-weight: 700;
    font-size: 0.8rem;
}

/* Form Styles */
.form-group {
    margin-bottom: 1.1rem;
}

.form-label {
    display: block;
    margin-bottom: 0.3rem;
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--text-primary);
}

.input-container {
    position: relative;
    width: 100%;
}

.input-container input,
.input-container textarea {
    width: 100%;
    background: #ffffff;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 10px 12px;
    font-size: 0.9rem;
    color: var(--text-primary);
    font-family: inherit;
    transition: all 0.15s ease;
}

.input-container textarea {
    resize: vertical;
    min-height: 80px;
}

.input-container input:focus,
.input-container textarea:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(0, 113, 227, 0.15);
}

/* Custom Hidden Input for Radio */
input[type="radio"].plan-radio {
    display: none;
}

/* Alert styles */
.alert {
    background: #fdf2f2;
    border: 1px solid #f8b4b4;
    color: #9b1c1c;
    padding: 0.75rem 1rem;
    border-radius: 8px;
    margin-bottom: 1.25rem;
    font-size: 0.85rem;
    display: flex;
    align-items: center;
    gap: 0.4rem;
}

/* Submit Button */
.submit-btn {
    width: 100%;
    background: var(--primary);
    border: none;
    border-radius: 8px;
    padding: 12px;
    color: white;
    font-size: 0.95rem;
    font-weight: 600;
    font-family: inherit;
    cursor: pointer;
    transition: background-color 0.15s ease, transform 0.1s ease;
    margin-top: 1.25rem;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.3rem;
}

.submit-btn:hover {
    background: #0077ed;
}

.submit-btn:active {
    transform: scale(0.995);
}

/* Footer styling */
footer {
    text-align: center;
    margin-top: 2rem;
    color: var(--text-muted);
    font-size: 0.75rem;
}

footer a {
    color: var(--text-secondary);
    text-decoration: none;
    transition: color 0.15s ease;
    font-weight: 500;
}

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

/* Success Page Styling */
.success-card {
    text-align: center;
    padding: 2.5rem 1.5rem;
    max-width: 540px;
    margin: 0 auto;
}

.success-icon {
    width: 52px;
    height: 52px;
    background: rgba(52, 199, 89, 0.08); /* Apple system green tint */
    border: 1px solid rgba(52, 199, 89, 0.15);
    color: #34c759;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.75rem;
    font-weight: 800;
    margin: 0 auto 1.25rem auto;
}

.success-title {
    font-size: 1.75rem;
    margin-bottom: 0.5rem;
    color: var(--text-primary);
    font-weight: 700;
}

.success-details {
    background: #f5f5f7;
    border: 1px solid rgba(0, 0, 0, 0.04);
    border-radius: 10px;
    padding: 1rem;
    margin: 1.5rem 0;
    text-align: left;
}

.detail-row {
    display: flex;
    justify-content: space-between;
    padding: 0.5rem 0;
    border-bottom: 1px solid rgba(0, 0, 0, 0.04);
}

.detail-row:last-child {
    border-bottom: none;
}

.detail-label {
    color: var(--text-secondary);
    font-size: 0.85rem;
}

.detail-value {
    color: var(--text-primary);
    font-weight: 500;
    font-size: 0.85rem;
}

.back-btn {
    display: inline-flex;
    align-items: center;
    text-decoration: none;
    background: #f5f5f7;
    border: 1px solid var(--border-color);
    border-radius: 6px;
    padding: 8px 16px;
    color: var(--text-primary);
    font-weight: 600;
    font-size: 0.85rem;
    transition: all 0.15s ease;
}

.back-btn:hover {
    background: #e8e8ed;
}
