/* ============================================
   FigmaMCP Design System
   Consolidated CSS for Careme DKT Application
   ============================================ */

/* ============================================
   CSS Custom Properties (Design Tokens)
   ============================================ */
:root {
    /* Primary Brand Colors */
    --color-primary: #7F56D9;
    --color-primary-hover: #6941C6;
    --color-primary-active: #53389E;
    --color-primary-disabled: #E9D7FE;
    --color-primary-light: #9E77ED;

    /* Text Colors */
    --color-text-primary: #181D27;
    --color-text-secondary: #414651;
    --color-text-tertiary: #535862;
    --color-text-placeholder: #717680;
    --color-text-white: #ffffff;
    --color-text-brand: #6941C6;

    /* Background Colors */
    --color-bg-primary: #ffffff;
    --color-bg-secondary: #FAFAFA; 
    --color-bg-hover: #F9FAFB;
    --color-bg-active: #F5F5F5;
    --color-bg-success: #ECFDF3;

    /* Border Colors */
    --color-border-primary: #D5D7DA;
    --color-border-secondary: #E9EAEB;
    --color-border-brand: #9E77ED;
    --color-border-error: #FDA29B;

    /* Status Colors */
    --color-error: #F04438;
    --color-warning: #DC6803;
    --color-success: #26b050;

    /* Typography */
    --font-family: 'Euclid Circular A', sans-serif;

    /* Font Weights */
    --font-weight-regular: 400;
    --font-weight-medium: 500;
    --font-weight-semibold: 600;
    --font-weight-bold: 700;

    /* Font Sizes */
    --font-size-display-sm: 30px;
    --font-size-text-lg: 18px;
    --font-size-text-md: 16px;
    --font-size-text-sm: 14px;

    /* Line Heights */
    --line-height-display-sm: 38px;
    --line-height-text-lg: 28px;
    --line-height-text-md: 24px;
    --line-height-text-sm: 20px;

    /* Spacing */
    --spacing-xxs: 2px;
    --spacing-xs: 4px;
    --spacing-sm: 6px;
    --spacing-md: 8px;
    --spacing-lg: 12px;
    --spacing-xl: 16px;
    --spacing-2xl: 20px;
    --spacing-3xl: 24px;
    --spacing-4xl: 32px;
    --spacing-5xl: 48px;
    --spacing-6xl: 64px;
    --spacing-7xl: 96px;
    --spacing-8xl: 160px;

    /* Border Radius */
    --radius-xs: 4px;
    --radius-sm: 6px;
    --radius-md: 8px;
    --radius-lg: 12px;
    --radius-xl: 16px;
    --radius-full: 9999px;

    /* Shadows */
    --shadow-xs: 0px 1px 2px 0px rgba(10, 13, 18, 0.05);
    --shadow-focus: 0px 0px 0px 4px rgba(127, 86, 217, 0.12), 0px 1px 2px 0px rgba(10, 13, 18, 0.05);
    --shadow-skeuomorphic: 0px 1px 2px 0px rgba(10, 13, 18, 0.05),
                           inset 0px -2px 0px 0px rgba(10, 13, 18, 0.05),
                           inset 0px 0px 0px 1px rgba(10, 13, 18, 0.18);
}

/* ============================================
   Base Page Layout
   ============================================ */
.careme-page {
    display: flex;
    flex-direction: column;
    align-items: center;
    background-color: var(--color-bg-primary);
/*    min-height: 100vh;
*/    width: 100%;
    isolation: isolate;
}

.careme-container {
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    width: 100%;
/*    min-height: 960px;
*/    background-color: var(--color-bg-primary);
}

/* ============================================
   Background Pattern
   ============================================ */
.background-pattern {
    position: absolute;
    top: -196px;
    left: 50%;
    transform: translateX(-50%);
    width: 768px;
    height: 768px;
    background-image:
        linear-gradient(to right, var(--color-border-secondary) 1px, transparent 1px),
        linear-gradient(to bottom, var(--color-border-secondary) 1px, transparent 1px);
    background-size: 48px 48px;
    mask-image: radial-gradient(circle at center, black 0%, transparent 70%);
    -webkit-mask-image: radial-gradient(circle at center, black 0%, transparent 70%);
    pointer-events: none;
    z-index: 0;
}

/* ============================================
   Page Content
   ============================================ */
.careme-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: var(--spacing-4xl);
    max-width: 360px;
    width: 100%;
    padding: var(--spacing-8xl) var(--spacing-4xl) var(--spacing-7xl);
    position: relative;
    z-index: 1;
    box-sizing: border-box;
}

/* ============================================
   Header / Page Title
   ============================================ */
.careme-header {
    display: flex;
    flex-direction: column;
    gap: var(--spacing-lg);
    text-align: center;
    width: 100%;
}

.careme-title {
    font-family: var(--font-family);
    font-weight: var(--font-weight-semibold);
    font-size: var(--font-size-display-sm);
    line-height: var(--line-height-display-sm);
    color: var(--color-text-primary);
    margin: 0;
}

.careme-subtitle {
    font-family: var(--font-family);
    font-weight: var(--font-weight-regular);
    font-size: var(--font-size-text-md);
    line-height: var(--line-height-text-md);
    color: var(--color-text-tertiary);
    margin: 0;
}

/* ============================================
   Typography
   ============================================ */
.text-lg-semibold {
    font-family: var(--font-family);
    font-weight: var(--font-weight-semibold);
    font-size: var(--font-size-text-lg);
    line-height: var(--line-height-text-lg);
}

.text-md-regular {
    font-family: var(--font-family);
    font-weight: var(--font-weight-regular);
    font-size: var(--font-size-text-md);
    line-height: var(--line-height-text-md);
}

.text-md-semibold {
    font-family: var(--font-family);
    font-weight: var(--font-weight-semibold);
    font-size: var(--font-size-text-md);
    line-height: var(--line-height-text-md);
}

.text-sm-regular {
    font-family: var(--font-family);
    font-weight: var(--font-weight-regular);
    font-size: var(--font-size-text-sm);
    line-height: var(--line-height-text-sm);
}

.text-sm-medium {
    font-family: var(--font-family);
    font-weight: var(--font-weight-medium);
    font-size: var(--font-size-text-sm);
    line-height: var(--line-height-text-sm);
}

.text-sm-semibold {
    font-family: var(--font-family);
    font-weight: var(--font-weight-semibold);
    font-size: var(--font-size-text-sm);
    line-height: var(--line-height-text-sm);
}

/* ============================================
   Buttons
   ============================================ */

/* Primary Button */
.btn-primary {
    background-color: var(--color-primary);
    border: none;
    border-radius: var(--radius-md);
    padding: 10px var(--spacing-xl);
    font-family: var(--font-family);
    font-weight: var(--font-weight-semibold);
    font-size: var(--font-size-text-md);
    line-height: var(--line-height-text-md);
    color: var(--color-text-white);
    cursor: pointer;
    width: 100%;
    transition: background-color 0.2s ease;
    box-sizing: border-box;
}

.btn-primary:hover:not(:disabled) {
    background-color: var(--color-primary-hover);
}

.btn-primary:active:not(:disabled) {
    background-color: var(--color-primary-active);
}

.btn-primary:disabled {
    background-color: var(--color-primary-disabled);
    cursor: not-allowed;
}

/* Secondary Button (Go Back) */
.btn-secondary {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: var(--spacing-sm);
    padding: 10px var(--spacing-xl);
    background-color: var(--color-bg-primary);
    border: 1px solid var(--color-border-primary);
    border-radius: var(--radius-md);
    cursor: pointer;
    width: 100%;
    transition: background-color 0.2s ease, border-color 0.2s ease;
    box-sizing: border-box;
}

.btn-secondary:hover {
    background-color: var(--color-bg-hover);
}

.btn-secondary:active {
    background-color: var(--color-bg-active);
}

.btn-secondary .btn-icon {
    width: 20px;
    height: 20px;
    flex-shrink: 0;
}

.btn-secondary .btn-text {
    font-family: var(--font-family);
    font-weight: var(--font-weight-semibold);
    font-size: var(--font-size-text-md);
    line-height: var(--line-height-text-md);
    color: var(--color-text-secondary);
    padding: 0 var(--spacing-xxs);
}

/* Link Button */
.btn-link {
    background: transparent;
    border: none;
    font-family: var(--font-family);
    font-weight: var(--font-weight-semibold);
    font-size: var(--font-size-text-sm);
    line-height: var(--line-height-text-sm);
    color: var(--color-text-brand);
    cursor: pointer;
    padding: 0;
}

.btn-link:hover {
    color: var(--color-primary-active);
    text-decoration: underline;
}

/* ============================================
   Support Row
   ============================================ */
.support-row {
    display: flex;
    justify-content: center;
    width: 100%;
}

/* ============================================
   Form Elements
   ============================================ */

/* Form Content Container */
.form-content {
    display: flex;
    flex-direction: column;
    gap: var(--spacing-3xl);
    width: 100%;
    border-radius: var(--radius-lg);
}

/* Form Actions */
.form-actions {
    display: flex;
    flex-direction: column;
    width: 100%;
}

/* Input Field Container */
.input-field {
    display: flex;
    flex-direction: column;
    gap: var(--spacing-sm);
    width: 100%;
}

/* Field Label */
.field-label {
    font-family: var(--font-family);
    font-weight: var(--font-weight-medium);
    font-size: var(--font-size-text-sm);
    line-height: var(--line-height-text-sm);
    color: var(--color-text-secondary);
}

.field-label-semibold {
    font-family: var(--font-family);
    font-weight: var(--font-weight-semibold);
    font-size: var(--font-size-text-sm);
    line-height: var(--line-height-text-sm);
    color: var(--color-text-secondary);
}

/* Required Asterisk */
.required-asterisk {
    color: var(--color-primary);
    font-weight: var(--font-weight-semibold);
}

/* Text Input */
.text-input {
    background-color: var(--color-bg-primary);
    border: 1px solid var(--color-border-primary);
    border-radius: var(--radius-md);
    padding: 10px 14px;
    font-family: var(--font-family);
    font-weight: var(--font-weight-regular);
    font-size: var(--font-size-text-md);
    line-height: var(--line-height-text-md);
    color: var(--color-text-primary);
    box-shadow: var(--shadow-xs);
    width: 100%;
    box-sizing: border-box;
}

.text-input::placeholder {
    color: var(--color-text-placeholder);
}

.text-input:focus {
    outline: none;
    border-color: var(--color-primary);
    box-shadow: var(--shadow-focus);
}

.text-input.input-error {
    border-color: var(--color-border-error);
}

/* Select Input */
.select-input {
    position: relative;
    display: flex;
    align-items: center;
    background-color: var(--color-bg-primary);
    border: 1px solid var(--color-border-primary);
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-xs);
}
.form-select {
    height: 44px !important;
    padding: 10px 10px!important;
    border:none;
}

.select-inner {
    flex: 1;
    border: none;
    background: transparent;
    padding: 10px 14px;
    font-family: var(--font-family);
    font-weight: var(--font-weight-regular);
    font-size: var(--font-size-text-md);
    line-height: var(--line-height-text-md);
    color: var(--color-text-placeholder);
    appearance: none;
    -webkit-appearance: none;
    -moz-appearance: none;
    cursor: pointer;
}

.select-inner:focus {
    outline: none;
}

.chevron-icon {
    width: 16px;
    height: 16px;
    margin-right: 14px;
    flex-shrink: 0;
    pointer-events: none;
}

/* Helper Text */
.helper-text {
    font-family: var(--font-family);
    font-weight: var(--font-weight-regular);
    font-size: var(--font-size-text-sm);
    line-height: var(--line-height-text-sm);
    color: var(--color-text-tertiary);
    margin: 0;
}

/* ============================================
   Selection Cards (Checkbox/Radio)
   ============================================ */

/* Card Base */
.selection-card {
    display: flex;
    align-items: flex-start;
    padding: var(--spacing-xl);
    background-color: var(--color-bg-primary);
    border: 1px solid var(--color-border-secondary);
    border-radius: var(--radius-lg);
    width: 100%;
    box-sizing: border-box;
    cursor: pointer;
    transition: border-color 0.2s ease, border-width 0.1s ease;
}

.selection-card:hover {
    border-color: var(--color-border-primary);
}

.selection-card.selected {
    border: 2px solid var(--color-border-brand);
    padding: 15px; /* Compensate for thicker border */
}

.selection-card-content {
    display: flex;
    gap: var(--spacing-md);
    align-items: flex-start;
    flex: 1;
}

/* Checkbox Custom */
.checkbox-custom {
    width: 16px;
    height: 16px;
    border: 1px solid var(--color-border-primary);
    border-radius: var(--radius-xs);
    background-color: var(--color-bg-primary);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s ease;
    flex-shrink: 0;
}

.checkbox-custom.checked {
    background-color: var(--color-primary);
    border-color: var(--color-primary);
}

.check-icon {
    width: 10px;
    height: 10px;
}

/* Radio Custom */
.radio-custom {
    width: 16px;
    height: 16px;
    border: 2px solid var(--color-border-secondary);
    border-radius: var(--radius-full);
    background-color: var(--color-bg-primary);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
    position: relative;
    flex-shrink: 0;
}

.radio-custom.checked {
    background-color: var(--color-primary);
    border-color: var(--color-primary);
}

.radio-dot {
    width: 6px;
    height: 6px;
    border-radius: var(--radius-full);
    background-color: var(--color-bg-primary);
}

/* Selection Label */
.selection-label {
    font-family: var(--font-family);
    font-weight: var(--font-weight-medium);
    font-size: var(--font-size-text-sm);
    line-height: var(--line-height-text-sm);
    color: var(--color-text-secondary);
    margin: 0;
    flex: 1;
}

/* ============================================
   Summary/Display Fields
   ============================================ */
.summary-field {
    display: flex;
    flex-direction: column;
    width: 100%;
}

.field-label-wrapper {
    display: flex;
    gap: var(--spacing-xxs);
    align-items: center;
}

.field-value {
    font-family: var(--font-family);
    font-weight: var(--font-weight-regular);
    font-size: var(--font-size-text-sm);
    line-height: var(--line-height-text-sm);
    color: var(--color-text-tertiary);
    margin: 0;
}

/* Two Column Row */
.two-column-row {
    display: flex;
    gap: var(--spacing-2xl);
    width: 100%;
}

.two-column-row .summary-field {
    flex: 1;
    min-width: 0;
}

/* Divider */
.divider {
    width: 100%;
    height: 1px;
    background-color: var(--color-border-secondary);
}

/* ============================================
   Cards
   ============================================ */

/* Success Card (Voucher) */
.success-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: var(--spacing-lg) var(--spacing-3xl);
    background-color: var(--color-bg-success);
    border-radius: var(--radius-xl);
    width: 100%;
    box-sizing: border-box;
}

/* Info Card */
.info-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: var(--spacing-4xl);
    padding: 52px var(--spacing-3xl) var(--spacing-4xl);
    background-color: var(--color-bg-secondary);
    border-radius: var(--radius-xl);
    width: 100%;
    box-sizing: border-box;
    position: relative;
}

/* Floating Icon */
.floating-icon {
    position: absolute;
    top: -32px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: var(--spacing-xs);
    background-color: var(--color-bg-primary);
    border: 1px solid var(--color-border-primary);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-skeuomorphic);
}

/* ============================================
   List Items
   ============================================ */
.list-row {
    display: flex;
    align-items: center;
    height: 72px;
    padding: var(--spacing-xl) var(--spacing-3xl);
    width: 100%;
    box-sizing: border-box;
    cursor: pointer;
    transition: background-color 0.2s ease;
}

.list-row.row-gray {
    background-color: var(--color-bg-secondary);
    border-bottom: 1px solid var(--color-border-secondary);
}

.list-row.row-white {
    background-color: var(--color-bg-primary);
    border-radius: var(--radius-lg);
}

.list-row:hover {
    background-color: var(--color-bg-active);
}

/* ============================================
   Pagination Dots
   ============================================ */
.pagination-dots {
    display: flex;
    gap: var(--spacing-xl);
    align-items: center;
    justify-content: center;
}

.dot {
    width: 10px;
    height: 10px;
    border-radius: var(--radius-full);
    background-color: var(--color-border-secondary);
}

.dot.active {
    background-color: var(--color-primary);
}

/* ============================================
   Alert Box
   ============================================ */
.alert-box {
    display: flex;
    gap: var(--spacing-xl);
    align-items: flex-start;
    padding: var(--spacing-xl);
    background-color: var(--color-bg-primary);
    border: 1px solid var(--color-border-primary);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-xs);
    width: 100%;
    position: relative;
    box-sizing: border-box;
}

.alert-close {
    position: absolute;
    top: 7px;
    right: 7px;
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: transparent;
    border: none;
    border-radius: var(--radius-md);
    cursor: pointer;
    padding: var(--spacing-md);
}

.alert-close:hover {
    background-color: var(--color-bg-active);
}

.alert-content {
    display: flex;
    flex-direction: column;
    gap: var(--spacing-xs);
    flex: 1;
    padding-right: var(--spacing-4xl);
}

.alert-title {
    font-family: var(--font-family);
    font-weight: var(--font-weight-semibold);
    font-size: var(--font-size-text-sm);
    line-height: var(--line-height-text-sm);
    color: var(--color-text-secondary);
    margin: 0;
}

.alert-description {
    font-family: var(--font-family);
    font-weight: var(--font-weight-regular);
    font-size: var(--font-size-text-sm);
    line-height: var(--line-height-text-sm);
    color: var(--color-text-tertiary);
    margin: 0;
}

/* ============================================
   Confirmation Box
   ============================================ */
.confirmation-box {
    display: flex;
    align-items: flex-start;
    padding: var(--spacing-xl);
    background-color: var(--color-bg-primary);
    border: 2px solid var(--color-border-primary);
    border-radius: var(--radius-lg);
    width: 100%;
    box-sizing: border-box;
    transition: border-color 0.2s ease;
}

.confirmation-box.confirmed {
    border-color: var(--color-border-brand);
}

/* ============================================
   Logo
   ============================================ */
.logo-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    width: 100%;
}

.company-logo {
    width: 190px;
    height: 67px;
    object-fit: contain;
}

/* ============================================
   Responsive Adjustments
   ============================================ */
@media (max-width: 480px) {
    .careme-content {
        padding: 80px var(--spacing-xl) var(--spacing-5xl);
    }

    .background-pattern {
        width: 100%;
    }

    .two-column-row {
        flex-direction: column;
        gap: var(--spacing-2xl);
    }

    .selection-card {
        padding: 14px;
    }

    .selection-card.selected {
        padding: 13px;
    }

    .list-row {
        padding: var(--spacing-lg) var(--spacing-xl);
        height: auto;
        min-height: 64px;
    }
}

/* ============================================
   Metric Cards
   ============================================ */
.metric-card {
    display: flex;
    flex-direction: column;
    gap: var(--spacing-md);
    padding: var(--spacing-2xl);
    background-color: var(--color-bg-primary);
    border: 2px solid var(--color-border-secondary);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-xs);
    width: 100%;
    min-width: 304px;
    box-sizing: border-box;
    cursor: pointer;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.metric-card:hover {
    border-color: var(--color-border-primary);
}

.metric-card-label {
    font-family: var(--font-family);
    font-weight: var(--font-weight-medium);
    font-size: var(--font-size-text-sm);
    line-height: var(--line-height-text-sm);
    color: var(--color-text-tertiary);
    margin: 0;
}

.metric-card-content {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: var(--spacing-xl);
    width: 100%;
}

.metric-card-value {
    font-family: var(--font-family);
    font-weight: var(--font-weight-medium);
    font-size: 24px;
    line-height: 32px;
    color: var(--color-text-primary);
    margin: 0;
    flex: 1;
}

.metric-card-text {
    font-family: var(--font-family);
    font-weight: var(--font-weight-medium);
    font-size: 20px;
    line-height: 30px;
    color: var(--color-text-primary);
    margin: 0;
    flex: 1;
}

.metric-card-icon {
    width: 24px;
    height: 24px;
    flex-shrink: 0;
}

.metric-card-icon svg {
    width: 100%;
    height: 100%;
}
