/* --- Global: variables, layout, shared components --- */
:root {
    --bg-color: #ffffff;
    --text-color: #202124;
    --accent-color: #796651;
    --secondary-text: #5f6368;
    --border-color: #e0e0e0;
    --font-family: 'Google Sans', sans-serif;
    /* Spacing */
    --space-xs: 0.35rem;
    --space-sm: 0.5rem;
    --space-md: 1rem;
    --space-lg: 1.25rem;
    --space-xl: 1.5rem;
    --space-2xl: 2rem;
    /* Policy pages */
    --note-bg: #f5f3ef;
    --note-border: #c4b5a0;
    --guarantee-bg: #e8f5e9;
    --guarantee-border: #2e7d32;
    --guarantee-text: #1b5e20;
    --final-sale-bg: #fff8e1;
    --final-sale-border: #f9a825;
    --final-sale-text: #e65100;
}

html {
    overflow-x: hidden;
    -webkit-text-size-adjust: 100%;
}

body {
    margin: 0;
    font-family: var(--font-family);
    background-color: var(--bg-color);
    color: var(--text-color);
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    min-height: 100dvh;
    overflow-x: hidden;
    padding-left: env(safe-area-inset-left);
    padding-right: env(safe-area-inset-right);
}

a {
    text-decoration: none;
    color: inherit;
}

button {
    font-family: var(--font-family);
    cursor: pointer;
    border: none;
    outline: none;
}

/* --- Main content --- */
.main-content {
    flex: 1;
    min-height: 100vh;
}

/* --- Utility (mobile) --- */
.container {
    max-width: 100%;
    margin: 0 auto;
    padding: var(--space-md);
    padding-left: calc(var(--space-md) + env(safe-area-inset-left));
    padding-right: calc(var(--space-md) + env(safe-area-inset-right));
    box-sizing: border-box;
    width: 100%;
}

/* --- Buttons --- */
.btn-primary {
    background-color: var(--accent-color);
    color: white;
    padding: 0.8rem 2rem;
    font-size: 1rem;
    font-weight: 500;
    border-radius: 50px;
    transition: background-color 0.2s, transform 0.1s;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    min-height: 44px;
    -webkit-tap-highlight-color: transparent;
}

.btn-primary:hover { background-color: #635342; }
.btn-primary:active { transform: scale(0.98); }

/* --- Card (policy & form, mobile) --- */
.ui-card {
    background: #fff;
    width: calc(100% + 2 * var(--space-md));
    margin-left: calc(-1 * var(--space-md));
    margin-right: calc(-1 * var(--space-md));
    padding: var(--space-xl) var(--space-lg) var(--space-2xl);
    padding-left: calc(var(--space-lg) + env(safe-area-inset-left));
    padding-right: calc(var(--space-lg) + env(safe-area-inset-right));
    border-radius: 0;
    box-shadow: none;
    border: 1px solid #f0f0f0;
    border-left: none;
    border-right: none;
    box-sizing: border-box;
}

/* --- Inputs (mobile: prevent zoom on iOS, touch targets) --- */
input.input-component__field,
textarea.input-component__field,
.dropdown-input__trigger {
    font-size: 16px;
    min-height: 44px;
}

textarea.input-component__field {
    min-height: 100px;
}

/* --- Override browser autofill highlight (blue/yellow) --- */
input:-webkit-autofill,
input:-webkit-autofill:hover,
input:-webkit-autofill:focus,
input:-webkit-autofill:active,
textarea:-webkit-autofill,
textarea:-webkit-autofill:hover,
textarea:-webkit-autofill:focus,
textarea:-webkit-autofill:active {
    -webkit-box-shadow: 0 0 0 30px var(--bg-color) inset !important;
    box-shadow: 0 0 0 30px var(--bg-color) inset !important;
    transition: background-color 5000s ease-in-out 0s;
}
