/* 
   Existing Patient - Project Design System Check
   Based on new-patient.css standard
*/
@import url('https://fonts.googleapis.com/css2?family=Noto+Sans+KR:wght@300;400;500;700&display=swap');

:root {
    --primary-color: #1B66C9;
    --primary-hover: #1652a3;
    --bg-color: #F8FBFF;
    --card-bg: #ffffff;
    --text-main: #494E53;
    --text-sub: #777d85;
    --border-color: #DDE2E8;
    --input-bg: #FFFFFF;

    --header-height: 60px;
    --footer-height: 70px;
    --input-height: 40px;
}

/* Base Setup */
html,
body {
    margin: 0;
    padding: 0;
    height: 100%;
    font-family: 'Pretendard', 'Noto Sans KR', sans-serif !important;
    background-color: var(--bg-color);
    overflow-y: auto;
    color: var(--text-main);
}

.kiosk-container {
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    width: 100%;
    background-color: var(--bg-color);
}

/* Header */
.page-header {
    height: var(--header-height);
    background-color: var(--card-bg);
    display: flex;
    align-items: center;
    padding: 0 40px;
    border-bottom: 1px solid var(--border-color);
    flex-shrink: 0;
}

.page-header .title {
    font-size: 20px;
    font-weight: 700;
    color: var(--text-main);
    margin: 0;
}

/* Body */
.page-body {
    flex: 1;
    padding: 24px;
    display: flex;
    justify-content: center;
}

/* Grid Layout */
.form-grid-layout {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
    width: 100%;
    max-width: 1800px;
}

/* Cards */
.form-section-card {
    background-color: var(--card-bg);
    border-radius: 8px;
    padding: 24px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.03);
    border: 1px solid #EEF2F7;
    display: flex;
    flex-direction: column;
    gap: 16px;
    height: fit-content;
}

.section-title {
    font-size: 16px;
    font-weight: 700;
    color: var(--primary-color);
    margin-bottom: 8px;
    border-bottom: 1px solid var(--border-color);
    padding-bottom: 8px;
}

/* Form Elements */
.form-row {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.form-row label {
    font-size: 13px;
    font-weight: 600;
    color: var(--text-main);
    margin: 0;
}

input[type="text"],
input[type="date"],
.select_box {
    width: 100%;
    height: var(--input-height);
    border: 1px solid var(--border-color);
    border-radius: 4px;
    padding: 0 12px;
    font-size: 14px;
    color: var(--text-main);
    background-color: var(--input-bg);
    box-sizing: border-box;
    font-family: 'Pretendard', sans-serif;
}

input[readonly] {
    background-color: #f9f9f9;
    cursor: default;
}

/* Select Box Mockup */
.select_box {
    display: flex;
    align-items: center;
    padding: 0;
    cursor: pointer;
    position: relative;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='6' viewBox='0 0 10 6'%3E%3Cpath fill='%23999' d='M5 6L0 0h10z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 12px center;
}

.select_box button.label {
    width: 100%;
    height: 100%;
    border: none;
    background: transparent;
    text-align: left;
    padding: 0 30px 0 12px;
    font-size: 14px;
    color: var(--text-main);
}

/* Table Style for existing patient info */
.info-table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 10px;
}

.info-table th,
.info-table td {
    padding: 10px;
    text-align: left;
    border-bottom: 1px solid #eee;
    font-size: 14px;
}

.info-table th {
    color: var(--text-sub);
    font-weight: 500;
    width: 100px;
}

.info-table td {
    color: var(--text-main);
    font-weight: 600;
}

/* Buttons */
.page-footer {
    height: var(--footer-height);
    background-color: var(--card-bg);
    border-top: 1px solid var(--border-color);
    display: flex;
    justify-content: flex-end;
    align-items: center;
    padding: 0 40px;
    gap: 12px;
}

button {
    height: 44px;
    padding: 0 24px;
    border-radius: 4px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    border: none;
    font-family: 'Pretendard', sans-serif;
}

.cancel_btn {
    background-color: #F0F2F5;
    color: #494E53;
}

.registration_bth {
    background-color: var(--primary-color);
    color: #fff;
}

/* Responsive */
@media (max-width: 1199px) {
    .form-grid-layout {
        grid-template-columns: 1fr;
    }
}