/* Kloudi Onboarding Platform - Styles */

:root {
    --azure: #bbdef4;
    --azure-dark: #a0cde8;
    --slate-50: #f8fafc;
    --slate-100: #f1f5f9;
    --slate-200: #e2e8f0;
    --slate-600: #475569;
    --slate-700: #334155;
    --slate-900: #0f172a;
    --green-600: #16a34a;
}

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

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    background: white;
    color: var(--slate-900);
    line-height: 1.6;
    margin: 0;
    padding: 0;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* Navigation */
.navbar {
    background: white;
    border-bottom: 1px solid var(--slate-200);
    padding: 1rem 0;
}

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

.nav-logo {
    height: 40px;
    width: auto;
}

.nav-links {
    display: flex;
    gap: 2rem;
    align-items: center;
    list-style: none;
}

.nav-links a {
    color: var(--slate-700);
    text-decoration: none;
    font-size: 0.95rem;
    font-weight: 500;
    transition: color 0.2s;
}

.nav-links a:hover {
    color: var(--azure-dark);
}

/* Mobile Navigation */
@media (max-width: 767px) {
    .nav-logo {
        height: 28px;
    }
    
    .nav-links {
        gap: 0.75rem;
    }
    
    .nav-links a {
        font-size: 0.75rem;
    }
}

/* Footer */
.footer {
    background: var(--slate-900);
    color: var(--slate-200);
    padding: 2rem 0;
    margin-top: 4rem;
}

.footer-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 1rem;
    text-align: center;
}

.footer-logo {
    height: 32px;
    width: auto;
    margin-bottom: 1rem;
    opacity: 0.9;
}

.footer-text {
    font-size: 0.875rem;
    color: var(--slate-200);
    opacity: 0.8;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 2rem 1rem;
    background: linear-gradient(to bottom, var(--slate-50), white);
    min-height: calc(100vh - 64px);
}

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

.badge {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.25rem 0.75rem;
    background: white;
    border: 1px solid var(--slate-200);
    border-radius: 9999px;
    font-size: 0.75rem;
    color: var(--slate-600);
    margin-bottom: 1.5rem;
}

h1 {
    font-size: 2.5rem;
    font-weight: 800;
    margin-bottom: 1rem;
    line-height: 1.2;
}

.subtitle {
    font-size: 1.125rem;
    color: var(--slate-600);
    max-width: 48rem;
    margin: 0 auto 1.5rem;
}

.features {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 1.5rem;
    margin-top: 1.5rem;
    font-size: 0.875rem;
    color: var(--slate-700);
}

.features span {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
}

/* Mobile Header */
@media (max-width: 767px) {
    .container {
        padding: 1rem 0.75rem;
    }
    
    .header {
        margin-bottom: 1.5rem;
    }
    
    .badge {
        font-size: 0.7rem;
        padding: 0.2rem 0.6rem;
    }
    
    h1 {
        font-size: 1.5rem;
        padding: 0 0.25rem;
    }
    
    .subtitle {
        font-size: 0.9rem;
        padding: 0 0.25rem;
    }
    
    .features {
        gap: 0.75rem;
        font-size: 0.75rem;
    }
}

/* Progress Bar */
.progress-bar {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 1rem;
    margin-bottom: 3rem;
}

.progress-step {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.progress-circle {
    width: 2.5rem;
    height: 2.5rem;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    background: var(--slate-200);
    color: var(--slate-600);
    flex-shrink: 0;
}

.progress-circle.active {
    background: var(--azure);
    color: var(--slate-900);
}

.progress-circle.completed {
    background: var(--green-600);
    color: white;
}

.progress-arrow {
    color: var(--slate-600);
}

/* Mobile Progress Bar */
@media (max-width: 767px) {
    .progress-bar {
        gap: 0.5rem;
        margin-bottom: 1.5rem;
    }
    
    .progress-step {
        gap: 0.35rem;
    }
    
    .progress-step span {
        font-size: 0.7rem;
    }
    
    .progress-circle {
        width: 2rem;
        height: 2rem;
        font-size: 0.85rem;
    }
    
    .progress-arrow {
        font-size: 0.85rem;
    }
}

/* Main Grid */
.main-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 2rem;
}

@media (min-width: 1024px) {
    .main-grid {
        grid-template-columns: 1fr 1fr;
    }
}

/* Card */
.card {
    background: white;
    border-radius: 0.5rem;
    padding: 2rem;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
}

.card h2 {
    font-size: 1.5rem;
    margin-bottom: 1.5rem;
}

.card h3 {
    font-size: 1.25rem;
    margin-bottom: 1rem;
}

/* Mobile Card */
@media (max-width: 767px) {
    .card {
        padding: 1.25rem;
        border-radius: 0.4rem;
    }
    
    .card h2 {
        font-size: 1.2rem;
        margin-bottom: 1rem;
    }
    
    .card h3 {
        font-size: 1.05rem;
    }
}

/* Pricing */
.pricing-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.price-box {
    padding: 1rem;
    border: 1px solid var(--slate-200);
    border-radius: 0.75rem;
}

.price-label {
    font-size: 0.75rem;
    color: var(--slate-600);
    font-weight: 500;
}

.price-amount {
    font-size: 1.5rem;
    font-weight: 800;
}

.price-period {
    font-size: 0.875rem;
    color: var(--slate-600);
}

/* Mobile Pricing */
@media (max-width: 767px) {
    .pricing-grid {
        gap: 0.75rem;
        margin-bottom: 1.25rem;
    }
    
    .price-box {
        padding: 0.75rem;
    }
    
    .price-label {
        font-size: 0.65rem;
    }
    
    .price-amount {
        font-size: 1.15rem;
    }
    
    .price-period {
        font-size: 0.75rem;
    }
}

/* Features List */
.feature-list {
    list-style: none;
    margin-top: 1rem;
    padding-left: 0.25rem;
}

.feature-list li {
    display: flex;
    gap: 0.75rem;
    padding: 0.375rem 0;
    font-size: 0.875rem;
    color: var(--slate-700);
    align-items: center;
}

.feature-list .checkmark {
    color: var(--green-600);
    flex-shrink: 0;
    font-weight: 600;
    line-height: 1;
}

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

.form-row {
    display: grid;
    grid-template-columns: 1fr;
    gap: 1.5rem;
}

@media (min-width: 768px) {
    .form-row {
        grid-template-columns: 1fr 1fr;
    }
}

label {
    display: block;
    margin-bottom: 0.5rem;
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--slate-700);
}

input, select, textarea {
    width: 100%;
    padding: 0.625rem 0.875rem;
    border: 1px solid var(--slate-200);
    border-radius: 0.375rem;
    font-size: 1rem;
    transition: border-color 0.2s;
    -webkit-appearance: none;
    appearance: none;
}

input:focus, select:focus, textarea:focus {
    outline: none;
    border-color: var(--azure);
    box-shadow: 0 0 0 3px rgba(187, 222, 244, 0.3);
}

/* FIXED: Validation styling - no red borders on page load */
/* Fields remain neutral until user interacts with them */
input:not(.touched):invalid,
select:not(.touched):invalid,
textarea:not(.touched):invalid {
    border-color: var(--slate-200) !important;
}

/* Green border when valid after user interaction */
input.touched:valid,
select.touched:valid,
textarea.touched:valid {
    border-color: var(--green-600);
    background-color: #f0fdf4;
}

/* Red border when invalid after user interaction */
input.touched:invalid,
select.touched:invalid,
textarea.touched:invalid {
    border-color: #dc2626;
    background-color: #fef2f2;
}

textarea {
    min-height: 100px;
    resize: vertical;
}

/* Mobile Forms */
@media (max-width: 767px) {
    .form-group {
        margin-bottom: 1rem;
    }
    
    .form-row {
        gap: 1rem;
    }
    
    label {
        font-size: 0.8rem;
        margin-bottom: 0.4rem;
    }
    
    input, select, textarea {
        padding: 0.7rem 0.75rem;
        font-size: 16px;
        border-radius: 0.375rem;
    }
    
    textarea {
        min-height: 80px;
    }
}

/* Compliance Notice */
.compliance-notice {
    background: var(--slate-50);
    border-radius: 0.5rem;
    padding: 1rem;
    font-size: 0.75rem;
    color: var(--slate-600);
    margin-bottom: 1.5rem;
    border-top: 1px solid var(--slate-200);
    margin-top: 1.5rem;
    padding-top: 1.5rem;
}

.compliance-notice p {
    margin-bottom: 0.5rem;
}

.compliance-notice strong {
    color: var(--slate-700);
}

.compliance-notice a {
    color: var(--azure-dark);
    text-decoration: underline;
}

/* Button */
.btn {
    width: 100%;
    padding: 0.75rem 1.5rem;
    background: var(--azure);
    color: var(--slate-900);
    border: none;
    border-radius: 1rem;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: background-color 0.2s;
    touch-action: manipulation;
    -webkit-tap-highlight-color: transparent;
}

.btn:hover:not(:disabled) {
    background: var(--azure-dark);
}

.btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

.btn:active:not(:disabled) {
    transform: scale(0.98);
}

/* Mobile Button */
@media (max-width: 767px) {
    .btn {
        padding: 0.875rem 1.25rem;
        font-size: 0.95rem;
        border-radius: 0.625rem;
    }
}

/* Stripe Elements */
#payment-element {
    margin-bottom: 1.5rem;
}

.payment-summary {
    text-align: center;
    padding: 1.5rem 0;
    border-top: 1px solid var(--slate-200);
    border-bottom: 1px solid var(--slate-200);
    margin: 1.5rem 0;
}

.payment-total {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--slate-900);
}

.payment-description {
    font-size: 0.875rem;
    color: var(--slate-600);
    margin-top: 0.5rem;
}

/* Loading */
.loading {
    text-align: center;
    padding: 2rem;
}

.spinner {
    border: 3px solid var(--slate-200);
    border-top-color: var(--slate-900);
    border-radius: 50%;
    width: 3rem;
    height: 3rem;
    animation: spin 1s linear infinite;
    margin: 0 auto 1rem;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* Error Message */
.error-message {
    background: #fee;
    border: 1px solid #fcc;
    color: #c33;
    padding: 0.75rem;
    border-radius: 0.375rem;
    margin-bottom: 1rem;
    font-size: 0.875rem;
}

/* Success Page */
.success-container {
    text-align: center;
    padding: 4rem 2rem;
}

.success-icon {
    width: 4rem;
    height: 4rem;
    background: var(--green-600);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 2rem;
    color: white;
    font-size: 2rem;
}

.success-container h1 {
    margin-bottom: 1rem;
}

.success-container p {
    color: var(--slate-600);
    margin-bottom: 0.5rem;
}

/* Mobile Success Page */
@media (max-width: 767px) {
    .success-container {
        padding: 2rem 1rem;
    }
    
    .success-icon {
        width: 3rem;
        height: 3rem;
        font-size: 1.5rem;
        margin-bottom: 1rem;
    }
    
    .success-container h1 {
        font-size: 1.5rem;
    }
    
    .success-container p {
        font-size: 0.9rem;
    }
}

/* Mobile Specific Adjustments */
@media (max-width: 767px) {
    .compliance-notice {
        padding: 0.875rem;
        font-size: 0.7rem;
    }
    
    .compliance-notice p {
        margin-bottom: 0.4rem;
    }
    
    .payment-summary {
        padding: 1.25rem 0;
        margin: 1.25rem 0;
    }
    
    .payment-total {
        font-size: 1.25rem;
    }
    
    .payment-description {
        font-size: 0.8rem;
    }
    
    .feature-list li {
        font-size: 0.8rem;
        padding: 0.3rem 0;
    }
    
    .loading {
        padding: 1.5rem;
    }
    
    .spinner {
        width: 2.5rem;
        height: 2.5rem;
    }
    
    .error-message {
        font-size: 0.8rem;
        padding: 0.65rem;
    }
    
    /* Adjust main-grid spacing on mobile */
    .main-grid {
        gap: 1.25rem;
    }
    
    /* Adjust footer on mobile */
    .footer {
        padding: 1.5rem 0;
        margin-top: 2.5rem;
    }
    
    .footer-logo {
        height: 28px;
        margin-bottom: 0.75rem;
    }
    
    .footer-text {
        font-size: 0.8rem;
    }
}
