/* ==========================================================
   Vesta Living — User Web Design System
   Aesthetic: vestaliving.ie (Cream / Forest Green / Classic)
   Fonts: Playfair Display (headings), DM Sans (body)
   ========================================================== */

/* ── Google Fonts ── */

@import url('https://fonts.googleapis.com/css2?family=Playfair+Display:wght@400;500;600;700&family=DM+Sans:wght@400;500;600;700&display=swap');

/* ── Design Tokens ── */
:root {
    /* Palette */
    --uw-cream: #F5F3EF;
    --uw-white: #FFFFFF;
    --uw-green: #0D3C2C;
    --uw-green-light: #1A5C45;
    --uw-green-hover: #0A2F22;
    --uw-charcoal: #1A1919;
    --uw-grey: #6B7280;
    --uw-grey-light: #D1D5DB;
    --uw-grey-pale: #E5E7EB;
    --uw-red: #DC2626;
    --uw-red-light: #FEF2F2;
    --uw-green-pale: #F0FDF4;
    --uw-amber: #D97706;
    --uw-amber-light: #FFFBEB;
    --uw-blue: #2563EB;

    /* Typography */
    --uw-font-heading: 'Playfair Display', Georgia, serif;
    --uw-font-body: 'DM Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;

    /* Radius */
    --uw-radius: 12px;
    --uw-radius-lg: 24px;
    --uw-radius-xl: 32px;
    --uw-radius-full: 9999px;

    /* Shadows */
    --uw-shadow: 0 1px 3px rgba(0, 0, 0, 0.06), 0 1px 2px rgba(0, 0, 0, 0.04);
    --uw-shadow-lg: 0 10px 25px rgba(0, 0, 0, 0.08);
}

/* ── Reset & Base ── */
*,
*::before,
*::after {
    box-sizing: border-box;
}

body.uw-body {
    margin: 0;
    font-family: var(--uw-font-body);
    font-size: 15px;
    line-height: 1.6;
    color: var(--uw-charcoal);
    background: var(--uw-cream);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* ── Layout ── */
.uw-page {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

.uw-header {
    padding: 20px 32px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: var(--uw-cream);
}

.uw-header__logo img {
    height: 22px;
    width: auto;
}

.uw-header__nav {
    display: flex;
    align-items: center;
    gap: 24px;
}

.uw-header__link {
    font-family: var(--uw-font-body);
    font-size: 14px;
    font-weight: 500;
    color: var(--uw-charcoal);
    text-decoration: none;
    transition: opacity 0.2s;
}

.uw-header__link:hover {
    opacity: 0.7;
}

.uw-main {
    flex: 1;
    display: flex;
    align-items: flex-start;
    justify-content: center;
    padding: 40px 20px 80px;
}

.uw-footer {
    padding: 24px 32px;
    text-align: center;
    font-size: 13px;
    color: var(--uw-grey);
}

/* ── Card ── */
.uw-card {
    background: var(--uw-white);
    border-radius: var(--uw-radius-lg);
    padding: 40px;
    width: 100%;
    max-width: 520px;
    margin: 0 auto;
    box-shadow: var(--uw-shadow-lg);
}

.uw-card--wide {
    max-width: 680px;
}

/* ── Typography ── */
.uw-heading {
    font-family: var(--uw-font-heading);
    color: var(--uw-charcoal);
    font-weight: 600;
    margin: 0 0 8px;
    line-height: 1.3;
}

.uw-heading--xl {
    font-size: 32px;
}

.uw-heading--lg {
    font-size: 26px;
}

.uw-heading--md {
    font-size: 20px;
}

.uw-heading--sm {
    font-size: 16px;
    font-weight: 600;
}

.uw-subtext {
    color: var(--uw-grey);
    font-size: 14px;
    margin: 0 0 24px;
    line-height: 1.5;
}

.uw-text-center {
    text-align: center;
}

/* ── Form Elements ── */
.uw-form-group {
    margin-bottom: 20px;
}

.uw-label {
    display: block;
    font-size: 13px;
    font-weight: 600;
    color: var(--uw-charcoal);
    margin-bottom: 6px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.uw-input {
    display: block;
    width: 100%;
    padding: 14px 16px;
    font-family: var(--uw-font-body);
    font-size: 15px;
    color: var(--uw-charcoal);
    background: var(--uw-cream);
    border: 1.5px solid transparent;
    border-radius: var(--uw-radius);
    outline: none;
    transition: border-color 0.2s, box-shadow 0.2s;
}

.uw-input::placeholder {
    color: var(--uw-grey);
    opacity: 0.6;
}

.uw-input:focus {
    border-color: var(--uw-green);
    box-shadow: 0 0 0 3px rgba(13, 60, 44, 0.1);
}

.uw-input-group {
    position: relative;
    display: flex;
    align-items: center;
}

.uw-input-group .uw-input {
    padding-right: 48px;
}

.uw-input-group__addon {
    position: absolute;
    right: 12px;
    background: none;
    border: none;
    cursor: pointer;
    font-size: 16px;
    color: var(--uw-grey);
    padding: 4px;
    transition: opacity 0.2s;
}

.uw-input-group__addon:hover {
    opacity: 0.7;
}

/* Phone group */
.uw-phone-group {
    display: flex;
    gap: 8px;
}

.uw-phone-group__code {
    width: 130px;
    flex-shrink: 0;
}

.uw-phone-group__number {
    flex: 1;
}

/* Select */
select.uw-input {
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%236B7280' d='M6 8L1 3h10z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 14px center;
    padding-right: 36px;
}

/* ── Buttons ── */
.uw-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    padding: 14px 28px;
    font-family: var(--uw-font-body);
    font-size: 15px;
    font-weight: 600;
    border: 2px solid transparent;
    border-radius: var(--uw-radius-full);
    cursor: pointer;
    transition: all 0.25s ease;
    text-decoration: none;
    text-align: center;
    line-height: 1.4;
}

.uw-btn--primary {
    background: var(--uw-green);
    color: var(--uw-white);
    border-color: var(--uw-green);
}

.uw-btn--primary:hover {
    background: var(--uw-green-hover);
    border-color: var(--uw-green-hover);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(13, 60, 44, 0.25);
}

.uw-btn--secondary {
    background: transparent;
    color: var(--uw-charcoal);
    border-color: var(--uw-charcoal);
}

.uw-btn--secondary:hover {
    background: var(--uw-charcoal);
    color: var(--uw-white);
}

.uw-btn--ghost {
    background: transparent;
    color: var(--uw-green);
    border-color: transparent;
}

.uw-btn--ghost:hover {
    background: var(--uw-green-pale);
}

.uw-btn--sm {
    padding: 10px 20px;
    font-size: 13px;
    width: auto;
}

/* ── Links ── */
.uw-link {
    color: var(--uw-green);
    text-decoration: none;
    font-weight: 500;
    transition: opacity 0.2s;
}

.uw-link:hover {
    opacity: 0.8;
    text-decoration: underline;
}

.uw-link--subtle {
    color: var(--uw-grey);
    font-size: 13px;
    text-decoration: none;
    transition: color 0.2s;
}

.uw-link--subtle:hover {
    color: var(--uw-green);
}

/* ── Divider ── */
.uw-divider {
    border: none;
    border-top: 1px solid var(--uw-grey-pale);
    margin: 24px 0;
}

/* ── Flash Messages ── */
.uw-flash {
    padding: 14px 18px;
    border-radius: var(--uw-radius);
    font-size: 14px;
    margin-bottom: 20px;
    line-height: 1.5;
}

.uw-flash--notice {
    background: var(--uw-green-pale);
    color: var(--uw-green);
    border: 1px solid rgba(13, 60, 44, 0.15);
}

.uw-flash--alert {
    background: var(--uw-red-light);
    color: var(--uw-red);
    border: 1px solid rgba(220, 38, 38, 0.15);
}

/* ── Progress Stepper ── */
.uw-stepper {
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 32px;
    padding: 0 16px;
}

.uw-stepper__step {
    display: flex;
    align-items: center;
}

.uw-stepper__dot {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 13px;
    font-weight: 600;
    font-family: var(--uw-font-body);
    background: var(--uw-grey-pale);
    color: var(--uw-grey);
    flex-shrink: 0;
    transition: all 0.3s;
}

.uw-stepper__dot--active {
    background: var(--uw-green);
    color: var(--uw-white);
    box-shadow: 0 0 0 4px rgba(13, 60, 44, 0.15);
}

.uw-stepper__dot--completed {
    background: var(--uw-green);
    color: var(--uw-white);
}

.uw-stepper__line {
    width: 28px;
    height: 2px;
    background: var(--uw-grey-pale);
    margin: 0 4px;
    transition: background 0.3s;
}

.uw-stepper__line--completed {
    background: var(--uw-green);
}

/* ── Progress Bar ── */
.uw-progress {
    height: 8px;
    background: var(--uw-grey-pale);
    border-radius: var(--uw-radius-full);
    overflow: hidden;
    margin-bottom: 8px;
}

.uw-progress__bar {
    height: 100%;
    background: var(--uw-green);
    border-radius: var(--uw-radius-full);
    transition: width 0.5s ease;
}

.uw-progress-label {
    display: flex;
    justify-content: space-between;
    font-size: 13px;
    color: var(--uw-grey);
    margin-bottom: 8px;
}

/* ── Upload Zone ── */
.uw-upload {
    border: 2px dashed var(--uw-grey-light);
    border-radius: var(--uw-radius-lg);
    padding: 32px;
    text-align: center;
    cursor: pointer;
    position: relative;
    transition: border-color 0.2s, background 0.2s;
    background: var(--uw-cream);
}

.uw-upload:hover,
.uw-upload--dragover {
    border-color: var(--uw-green);
    background: var(--uw-green-pale);
}

.uw-upload input[type="file"] {
    position: absolute;
    inset: 0;
    opacity: 0;
    cursor: pointer;
}

.uw-upload__icon {
    font-size: 32px;
    margin-bottom: 8px;
}

.uw-upload__text {
    font-size: 14px;
    color: var(--uw-grey);
}

.uw-upload__text strong {
    color: var(--uw-green);
}

/* Preview */
.uw-preview-list {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    margin-top: 12px;
}

.uw-preview-item {
    position: relative;
    width: 72px;
    height: 72px;
    border-radius: var(--uw-radius);
    overflow: hidden;
    border: 1px solid var(--uw-grey-pale);
}

.uw-preview-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.uw-preview-item__remove {
    position: absolute;
    top: 2px;
    right: 2px;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: var(--uw-red);
    color: white;
    border: none;
    font-size: 12px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* ── Webcam ── */
.uw-webcam {
    border-radius: var(--uw-radius-lg);
    overflow: hidden;
    background: #000;
    position: relative;
}

.uw-webcam video {
    width: 100%;
    display: block;
    border-radius: var(--uw-radius-lg);
}

.uw-webcam canvas {
    display: none;
}

.uw-webcam__captured {
    width: 100%;
    border-radius: var(--uw-radius-lg);
    margin-bottom: 12px;
}

.uw-webcam__overlay {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    pointer-events: none;
}

.uw-webcam__face-guide {
    width: 180px;
    height: 240px;
    border: 3px dashed rgba(255, 255, 255, 0.5);
    border-radius: 50%;
}

.uw-webcam__error {
    text-align: center;
    padding: 32px;
    background: var(--uw-cream);
    border-radius: var(--uw-radius-lg);
    color: var(--uw-grey);
}

/* ── Document Type Toggle ── */
.uw-doc-type {
    display: flex;
    gap: 8px;
}

.uw-doc-type__option {
    flex: 1;
    padding: 12px;
    background: var(--uw-cream);
    border: 2px solid transparent;
    border-radius: var(--uw-radius-full);
    font-family: var(--uw-font-body);
    font-size: 14px;
    font-weight: 500;
    color: var(--uw-grey);
    cursor: pointer;
    transition: all 0.2s;
    text-align: center;
}

.uw-doc-type__option:hover {
    border-color: var(--uw-grey-light);
}

.uw-doc-type__option--selected {
    background: var(--uw-green);
    color: var(--uw-white);
    border-color: var(--uw-green);
}

/* ── Toggle ── */
.uw-toggle {
    display: flex;
    align-items: center;
    gap: 12px;
    cursor: pointer;
}

.uw-toggle input {
    display: none;
}

.uw-toggle__track {
    width: 48px;
    height: 26px;
    background: var(--uw-grey-light);
    border-radius: var(--uw-radius-full);
    position: relative;
    transition: background 0.2s;
    flex-shrink: 0;
}

.uw-toggle__track::after {
    content: '';
    position: absolute;
    width: 22px;
    height: 22px;
    background: white;
    border-radius: 50%;
    top: 2px;
    left: 2px;
    transition: transform 0.2s;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.15);
}

.uw-toggle input:checked+.uw-toggle__track {
    background: var(--uw-green);
}

.uw-toggle input:checked+.uw-toggle__track::after {
    transform: translateX(22px);
}

.uw-toggle__label {
    font-size: 15px;
    color: var(--uw-charcoal);
}

/* ── Badges ── */
.uw-badge {
    display: inline-block;
    padding: 4px 14px;
    border-radius: var(--uw-radius-full);
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.uw-badge--pending {
    background: var(--uw-amber-light);
    color: var(--uw-amber);
}

.uw-badge--submitted {
    background: rgba(37, 99, 235, 0.1);
    color: var(--uw-blue);
}

.uw-badge--verified {
    background: var(--uw-green-pale);
    color: var(--uw-green);
}

.uw-badge--rejected {
    background: var(--uw-red-light);
    color: var(--uw-red);
}

/* ── Tooltip ── */
.uw-tooltip {
    position: relative;
    display: inline-block;
    margin-left: 6px;
}

.uw-tooltip__icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    background: var(--uw-grey-pale);
    color: var(--uw-grey);
    font-size: 11px;
    font-weight: 700;
    cursor: help;
}

.uw-tooltip__text {
    display: none;
    position: absolute;
    bottom: 130%;
    left: 50%;
    transform: translateX(-50%);
    background: var(--uw-charcoal);
    color: white;
    padding: 8px 12px;
    border-radius: 8px;
    font-size: 12px;
    white-space: nowrap;
    z-index: 100;
}

.uw-tooltip:hover .uw-tooltip__text {
    display: block;
}

/* ── Quick Links ── */
.uw-quick-links {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
    max-width: 520px;
    margin: 20px auto 0;
}

.uw-quick-link {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 16px 20px;
    background: var(--uw-white);
    border-radius: var(--uw-radius-lg);
    text-decoration: none;
    color: var(--uw-charcoal);
    font-weight: 500;
    font-size: 14px;
    box-shadow: var(--uw-shadow);
    transition: transform 0.2s, box-shadow 0.2s;
}

.uw-quick-link:hover {
    transform: translateY(-2px);
    box-shadow: var(--uw-shadow-lg);
}

.uw-quick-link__icon {
    font-size: 20px;
}

/* ── Profile Header ── */
.uw-profile-header {
    display: flex;
    align-items: center;
    gap: 16px;
    margin-bottom: 8px;
}

.uw-avatar {
    width: 64px;
    height: 64px;
    border-radius: 50%;
    object-fit: cover;
    background: var(--uw-cream);
    color: var(--uw-green);
    font-family: var(--uw-font-heading);
}

/* ── Row ── */
.uw-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
}

/* Partner rows */
.uw-partner-row {
    display: flex;
    gap: 8px;
    align-items: center;
    margin-bottom: 8px;
}

.uw-partner-row__remove {
    background: none;
    border: none;
    font-size: 20px;
    cursor: pointer;
    color: var(--uw-red);
    flex-shrink: 0;
    padding: 4px;
}

/* ── Spacing ── */
.uw-mt-8 {
    margin-top: 8px;
}

.uw-mt-16 {
    margin-top: 16px;
}

.uw-mt-24 {
    margin-top: 24px;
}

.uw-mt-32 {
    margin-top: 32px;
}

.uw-mb-24 {
    margin-bottom: 24px;
}

/* ── Responsive ── */
@media (max-width: 640px) {
    .uw-card {
        padding: 24px 20px;
        border-radius: var(--uw-radius);
    }

    .uw-row {
        grid-template-columns: 1fr;
    }

    .uw-heading--xl {
        font-size: 26px;
    }

    .uw-heading--lg {
        font-size: 22px;
    }

    .uw-stepper__dot {
        width: 28px;
        height: 28px;
        font-size: 11px;
    }

    .uw-stepper__line {
        width: 16px;
    }

    .uw-quick-links {
        grid-template-columns: 1fr;
    }

    .uw-header {
        padding: 16px 20px;
    }
}
