/* Google Fonts Import: Monospace/Sans-serif hybrid feel */
@import url('https://fonts.googleapis.com/css2?family=Outfit:wght@300;400;500;600;700&family=Space+Mono&display=swap');

:root {
    /* Color Palette using requested primary oklch color */
    --color-primary: oklch(0.3638 0.1561 260.88);
    --color-primary-hover: oklch(0.42 0.1561 260.88);
    --color-primary-light: oklch(0.92 0.03 260.88);

    /* Light Theme (inspired by motion.dev but clean off-white) */
    --color-bg: #f4f4f5;
    --color-card-bg: #ffffff;
    --color-header-bg: #fafafa;

    --color-text-main: #18181b;
    --color-text-muted: #71717a;

    /* Thin High-Contrast Borders */
    --color-border: #e4e4e7;
    --color-border-hover: #a1a1aa;

    --color-success: oklch(0.62 0.15 140);
    --color-error: oklch(0.55 0.18 25);

    /* Typography & Flat Geometry */
    --font-sans: 'Outfit', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    --font-mono: 'Space Mono', monospace;
    --border-radius-none: 0px;

    --transition-fast: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}

/* Base Styles */
* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
    border-radius: var(--border-radius-none) !important;
    /* Forces sharp corners globally */
}

body {
    font-family: var(--font-sans);
    background-color: var(--color-bg);
    color: var(--color-text-main);
    min-height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 2rem 1rem;
    line-height: 1.6;
}

/* Form Container - Sharp wireframe design */
.form-container {
    width: 100%;
    max-width: 800px;
    background-color: var(--color-card-bg);
    border: 1px solid var(--color-border);
    transition: var(--transition-fast);
    border-radius: 1.5rem !important;
    overflow: hidden;

}

.form-header {
    background-color: var(--color-header-bg);
    padding: 2.5rem 2rem;
    border-bottom: 1px solid var(--color-border);
}

.form-header h1 {
    font-size: 1.75rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
    letter-spacing: -0.03em;
    text-transform: uppercase;
}

.form-header p {
    font-size: 0.9rem;
    color: var(--color-text-muted);
    font-weight: 300;
}

.form-body {
    padding: 2.5rem 2rem;
}

/* Form Groups & Rows */
.form-row {
    display: grid;
    grid-template-columns: 1fr;
    gap: 1.5rem;
    margin-bottom: 2rem;
}

@media (min-width: 600px) {
    .form-row {
        grid-template-columns: 1fr 1fr;
        margin-bottom: 2rem;
    }

    .form-row.barcode-row {
        grid-template-columns: 2fr 1fr;
    }

    .form-row .form-group {
        margin-bottom: 0;
    }
}

.form-group {
    margin-bottom: 2rem;
    position: relative;
}

.form-label {
    display: block;
    font-family: var(--font-sans);
    font-size: 0.8rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
    color: var(--color-text-muted);
    text-transform: uppercase;
    letter-spacing: 0.08em;
}

.required {
    color: var(--color-error);
    font-weight: 700;
}

/* Input Wrapper & Phosphor Icon styling */
.input-wrapper {
    position: relative;
    width: 100%;
}

.input-wrapper .ph-duotone {
    position: absolute;
    right: 0.25rem;
    bottom: 0.65rem;
    font-size: 1.2rem;
    color: var(--color-text-muted);
    pointer-events: none;
    transition: var(--transition-fast);
}

.input-wrapper:focus-within .ph-duotone,
.input-wrapper .form-control:not(:placeholder-shown)~.ph-duotone {
    color: var(--color-primary);
}

.input-wrapper .form-control {
    padding-right: 1.75rem;
}

/* Inputs & Selections: Flat, Underlined + Light Theme */
.form-control {
    width: 100%;
    font-family: var(--font-sans);
    font-size: 1.05rem;
    padding: 0.65rem 0.25rem;
    background-color: transparent;
    border: none;
    border-bottom: 1.5px solid var(--color-border);
    color: var(--color-text-main);
    transition: var(--transition-fast);
    outline: none;
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;
}

.form-control::placeholder {
    color: var(--color-text-muted);
    opacity: 0.5;
}

.form-control:hover {
    border-bottom-color: var(--color-border-hover);
}

.form-control:focus {
    border-bottom-color: var(--color-primary);
}

/* Select element specifics */
select.form-control {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 24 24' stroke='%2371717a' stroke-width='2.5'%3E%3Cpath stroke-linecap='round' stroke-linejoin='round' d='M19 9l-7 7-7-7'/%3E%/svg%3E");
    background-repeat: no-repeat;
    background-position: right 0.25rem center;
    background-size: 1rem;
    padding-right: 2rem;
    cursor: pointer;
}

textarea.form-control {
    resize: none;
    height: 80px;
}

/* Checkbox design matching the visual reference (perfect square, blue filling, checkmark) */
.checkbox-group {
    display: flex;
    align-items: center;
    gap: 0.85rem;
    cursor: pointer;
    user-select: none;
}

.checkbox-container {
    position: relative;
    display: inline-block;
    width: 1.35rem;
    height: 1.35rem;
    flex-shrink: 0;
    margin-top: 0.2rem;
}

.checkbox-container input {
    position: absolute;
    opacity: 0;
    margin-bottom: 0;
    cursor: pointer;
    height: 0;
    width: 0;
}

.checkmark {
    position: absolute;
    top: 0;
    left: 0;
    height: 100%;
    width: 100%;
    background-color: transparent;
    border: 1.5px solid var(--color-border-hover);
    /* Slightly stronger outline in light mode */
    transition: var(--transition-fast);
    display: flex;
    align-items: center;
    justify-content: center;
}

.checkbox-container:hover input~.checkmark {
    border-color: var(--color-text-main);
}

.checkbox-container input:checked~.checkmark {
    background-color: var(--color-primary);
    border-color: var(--color-primary);
}

.checkmark .ph-check {
    color: white;
    font-size: 0.95rem;
    display: none;
}

.checkbox-container input:checked~.checkmark .ph-check {
    display: block;
}

.checkbox-label {
    font-size: 0.9rem;
    color: var(--color-text-muted);
    line-height: 1.5;
}

.checkbox-label a {
    color: var(--color-text-main);
    text-decoration: underline;
    font-weight: 500;
}

.checkbox-label a:hover {
    color: var(--color-primary);
}

/* Flat Sharp Primary Button */
.btn-submit {
    display: flex;
    justify-content: center;
    align-items: center;
    width: 100%;
    font-family: var(--font-sans);
    /* Technical/motion.dev font feel */
    font-size: 0.95rem;
    font-weight: 700;
    color: #ffffff;
    background-color: var(--color-primary);
    border: 1px solid var(--color-primary);
    border-radius: 0.2rem !important;
    padding: 1.1rem;
    cursor: pointer;
    transition: var(--transition-fast);
    letter-spacing: 0.08em;
}

.btn-submit:hover {
    background-color: var(--color-primary-hover);
    border-color: var(--color-primary-hover);
}

.btn-submit:focus {
    outline: none;
    border-color: var(--color-text-main);
}

/* Validation Message */
.validation-message {
    font-size: 0.8rem;
    color: var(--color-error);
    margin-top: 0.5rem;
    display: none;
}

/* Success Card */
.success-card {
    text-align: center;
    display: none;
}

.success-icon {
    width: 4.5rem;
    height: 4.5rem;
    background-color: rgba(104, 222, 122, 0.08);
    color: var(--color-success);
    border: 1.5px solid var(--color-success);
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 1.75rem;
    font-size: 1.8rem;
    font-weight: bold;
}

.success-card h2 {
    font-size: 1.5rem;
    font-weight: 700;
    margin-bottom: 0.75rem;
    text-transform: uppercase;
    letter-spacing: -0.01em;
}

.success-card p {
    color: var(--color-text-muted);
    font-size: 0.95rem;
    margin-bottom: 2.25rem;
}

/* Secondary Button - Sharp outline */
.btn-secondary {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background-color: transparent;
    border: 1px solid var(--color-border-hover);
    border-radius: 999px !important;
    color: var(--color-text-main);
    font-family: var(--font-sans);
    font-size: 0.85rem;
    font-weight: 600;
    padding: 0.8rem 1.6rem;
    cursor: pointer;
    transition: var(--transition-fast);
    letter-spacing: 0.05em;
}

.btn-secondary:hover {
    background-color: var(--color-header-bg);
    border-color: var(--color-text-main);
}

/* Utility classes */
.hidden {
    display: none !important;
}

/* Modal styling */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border-radius: 12px !important;
    background-color: rgba(9, 9, 11, 0.4);
    backdrop-filter: blur(4px);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 1000;
    animation: fadeIn 0.2s ease-out;
}

.modal-content {
    background-color: var(--color-card-bg);
    border: 1px solid var(--color-border);
    width: 90%;
    max-width: 480px;
    display: flex;
    flex-direction: column;
    justify-content: start;
    text-align: start;
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.25rem 1.5rem;
    border-bottom: 1px solid var(--color-border);
    background-color: var(--color-header-bg);
}

.modal-header h2 {
    font-size: 1.1rem;
    font-weight: 700;
    letter-spacing: -0.01em;
}



.btn-close {
    background: transparent;
    border: none;
    cursor: pointer;
    font-size: 1.35rem;
    color: var(--color-text-muted);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--transition-fast);
}

.btn-close:hover {
    color: var(--color-text-main);
}

.modal-body {
    padding: 1.5rem;
}

.barcode-image-container {
    border: 1px solid var(--color-border);
    overflow: hidden;
    margin-bottom: 1.25rem;
    height: 180px;
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: #f4f4f5;
}

.barcode-image-container img {
    width: 100%;
    height: auto;
    object-fit: cover;
    transform: scale(1.6);
    transform-origin: right top;
}

.modal-body p {
    font-size: 0.9rem;
    color: var(--color-text-muted);
    line-height: 1.5;
    text-align: center;
}

#kvkkModal .modal-body p,
#kvkkModal .modal-body ul,
#kvkkModal .modal-body li {
    text-align: start;
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}