/* Hair Works天 予約確認サイト - 完全版スタイルシート */

/* ベースリセット & Safari対応 */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    -webkit-box-sizing: border-box;
    -moz-box-sizing: border-box;
}

body {
    font-family: 'Hiragino Kaku Gothic ProN', 'Hiragino Sans', 'Meiryo', sans-serif;
    background: #0a1628;
    color: #ffffff;
    line-height: 1.6;
    min-height: 100vh;
    color-scheme: dark;
}

/* ヘッダー */
.main-header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    background: #0f1a2e;
    z-index: 1000;
    padding: 10px 0;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.3);
    border-bottom: 1px solid #ff8c42;
}

.header-content {
    max-width: 600px;
    margin: 0 auto;
    padding: 0 20px;
    display: flex;
    display: -webkit-flex;
    display: -ms-flexbox;
    align-items: center;
    justify-content: center;
    height: 80px;
    -webkit-box-sizing: border-box;
    -moz-box-sizing: border-box;
    box-sizing: border-box;
}

.header-logo {
    width: auto;
    height: 70px;
    max-height: 70px;
    background: transparent;
    border-radius: 8px;
    display: flex;
    display: -webkit-flex;
    display: -ms-flexbox;
    align-items: center;
    justify-content: center;
    font-size: 16px;
    font-weight: bold;
    color: #ffffff;
    position: relative;
    overflow: visible;
    flex-shrink: 0;
}

.header-logo .logo-image,
.header-logo img {
    height: 700px;
    max-height: 280px;
    width: auto;
    max-width: none;
    object-fit: contain;
    display: block;
    image-rendering: -webkit-optimize-contrast;
    image-rendering: crisp-edges;
}

.header-logo::after {
    content: "Hair Works天";
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    white-space: nowrap;
    display: block;
    color: #ffffff;
    font-size: 16px;
    font-weight: bold;
}

.header-logo.has-image::after {
    display: none;
}

/* メインコンテナ */
.container {
    max-width: 480px;
    margin: 0 auto;
    padding: 110px 20px 20px;
}

.page-header {
    text-align: center;
    margin-bottom: 30px;
    padding: 25px;
    background: #1a2a42;
    border-radius: 10px;
    border: 1px solid #ff8c42;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
}

.page-title {
    font-size: 24px;
    font-weight: bold;
    color: #ffffff;
    margin-bottom: 10px;
}

.page-subtitle {
    font-size: 16px;
    color: #ffffff;
    opacity: 0.8;
}

/* フォーム */
.form-container {
    background: #1a2a42;
    padding: 25px;
    border-radius: 10px;
    margin-bottom: 25px;
    border: 1px solid #ff8c42;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
}

.form-group {
    margin-bottom: 25px;
}

.form-label {
    display: block;
    margin-bottom: 10px;
    font-weight: bold;
    color: #ffffff;
}

.form-input,
.form-select {
    width: 100%;
    padding: 15px;
    border: 2px solid #ff8c42;
    border-radius: 8px;
    -webkit-border-radius: 8px;
    font-size: 16px;
    background: #243552;
    color: #ffffff;
    transition: all 0.2s ease;
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;
}

.form-input:focus,
.form-select:focus {
    outline: 2px solid #ff8c42;
    outline-offset: 2px;
    border-color: #ff8c42;
    background: #2a3f5f;
}

.form-input::placeholder {
    color: #999;
}

/* ボタン共通スタイル */
.confirm-button,
.back-button,
.cancel-button,
.check-reservation-button {
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;
    -webkit-user-select: none;
    -moz-user-select: none;
    user-select: none;
    -webkit-tap-highlight-color: transparent;
    font-size: 16px;
    font-weight: bold;
    cursor: pointer;
    border-radius: 25px;
    transition: all 0.2s ease;
    min-height: 44px;
    border: none;
    text-decoration: none;
    display: inline-block;
    text-align: center;
}

.confirm-button {
    background: #ff8c42;
    color: #0a1628;
    padding: 15px 35px;
    width: 100%;
    margin-top: 15px;
}

.confirm-button:hover,
.confirm-button:focus {
    background: #e67a35;
    outline: 2px solid #ff8c42;
    outline-offset: 2px;
}

.cancel-button {
    background: #ff4757;
    color: #ffffff;
    padding: 15px 25px;
    width: 48%;
}

.cancel-button:hover,
.cancel-button:focus {
    background: #ff3742;
    outline: 2px solid #ff4757;
    outline-offset: 2px;
}

.cancel-button:disabled {
    background: #666;
    color: #999;
    cursor: not-allowed;
    border: 2px solid #666;
}

.cancel-button:disabled:hover,
.cancel-button:disabled:focus {
    background: #666;
    outline: none;
    transform: none;
}

.back-button {
    background: transparent;
    color: #ffffff;
    border: 2px solid #ffffff;
    padding: 15px 25px;
    width: 48%;
}

.back-button:hover,
.back-button:focus {
    background: #ffffff;
    color: #0a1628;
    outline: 2px solid #ffffff;
    outline-offset: 2px;
}

.check-reservation-button {
    background: transparent;
    color: #ff8c42;
    border: 2px solid #ff8c42;
    padding: 15px 25px;
    border-radius: 25px;
    margin-top: 20px;
}

.check-reservation-button:hover,
.check-reservation-button:focus {
    background: #ff8c42;
    color: #0a1628;
    outline: 2px solid #ff8c42;
    outline-offset: 2px;
}

.button-group {
    display: flex;
    display: -webkit-flex;
    display: -ms-flexbox;
    justify-content: space-between;
    margin-top: 25px;
    gap: 4%;
    -webkit-box-sizing: border-box;
    -moz-box-sizing: border-box;
    box-sizing: border-box;
}

/* 確認ページ */
.confirmation-section {
    background: #1a2a42;
    padding: 25px;
    border-radius: 10px;
    margin-bottom: 25px;
    border: 1px solid #ff8c42;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
}

.confirmation-title {
    font-size: 20px;
    font-weight: bold;
    color: #ffffff;
    margin-bottom: 20px;
    text-align: center;
}

.confirmation-item {
    display: flex;
    display: -webkit-flex;
    display: -ms-flexbox;
    justify-content: space-between;
    align-items: center;
    padding: 12px 0;
    border-bottom: 1px solid rgba(255, 140, 66, 0.2);
    -webkit-box-sizing: border-box;
    -moz-box-sizing: border-box;
    box-sizing: border-box;
}

.confirmation-item:last-child {
    border-bottom: none;
}

.confirmation-label {
    font-weight: bold;
    color: #ffffff;
}

.confirmation-value {
    color: #ff8c42;
    font-weight: bold;
    text-align: right;
}

/* ステータス表示 */
.status-badge {
    padding: 6px 12px;
    border-radius: 15px;
    font-size: 14px;
    font-weight: bold;
    text-align: center;
}

.status-reserved {
    background: rgba(76, 175, 80, 0.2);
    color: #4caf50;
    border: 1px solid #4caf50;
}

.status-visited {
    background: rgba(33, 150, 243, 0.2);
    color: #2196f3;
    border: 1px solid #2196f3;
}

.status-cancelled {
    background: rgba(244, 67, 54, 0.2);
    color: #f44336;
    border: 1px solid #f44336;
}

/* 予約に関する注意事項 */
.reservation-notes {
    background: rgba(255, 140, 66, 0.1);
    padding: 18px;
    border-radius: 8px;
    margin-bottom: 20px;
    border-left: 4px solid #ff8c42;
}

.reservation-notes h4 {
    color: #ff8c42;
    font-size: 16px;
    margin-bottom: 12px;
}

.reservation-notes ul {
    list-style: none;
    color: #ffffff;
}

.reservation-notes li {
    margin-bottom: 8px;
    padding-left: 20px;
    position: relative;
    line-height: 1.5;
}

.reservation-notes li:before {
    content: "•";
    color: #ff8c42;
    position: absolute;
    left: 0;
    font-size: 14px;
}

/* 完了ページ */
.completion-container {
    text-align: center;
    background: #1a2a42;
    padding: 35px 25px;
    border-radius: 10px;
    border: 1px solid #ff8c42;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
}

.completion-title {
    font-size: 26px;
    font-weight: bold;
    color: #ff8c42;
    margin-bottom: 25px;
}

.completion-message {
    font-size: 16px;
    color: #ffffff;
    line-height: 1.8;
    margin-bottom: 25px;
}

/* エラー・読み込み表示 */
.error-message {
    background: #2a1f1f;
    color: #ff6b6b;
    border: 2px solid #ff4757;
    padding: 20px;
    border-radius: 8px;
    margin: 25px 0;
    text-align: center;
}

.loading-message {
    text-align: center;
    padding: 30px;
    background: #1a2a42;
    border-radius: 10px;
    margin: 25px 0;
    border: 1px solid #ff8c42;
}

.loading {
    color: #ffffff;
    font-size: 16px;
}

.loading::after {
    content: '...';
    animation: dots 1.5s infinite;
}

@keyframes dots {
    0%, 20% { content: ''; }
    40% { content: '.'; }
    60% { content: '..'; }
    80%, 100% { content: '...'; }
}

/* ページ表示制御 */
.page {
    display: none;
}

.page.active {
    display: block;
}

/* レスポンシブ対応 */
@media screen and (max-width: 768px) {
    .container {
        padding: 100px 16px 16px;
    }
    
    .header-content {
        padding: 0 16px;
    }
    
    .header-logo {
        height: 60px;
        max-height: 60px;
    }
    
    .header-logo .logo-image,
    .header-logo img {
        height: 700px;
        max-height: 280px;
    }
    
    .button-group {
        -webkit-box-orient: vertical;
        -webkit-box-direction: normal;
        -webkit-flex-direction: column;
        -ms-flex-direction: column;
        flex-direction: column;
        gap: 12px;
    }
    
    .back-button,
    .cancel-button {
        width: 100%;
    }
}

/* アクセシビリティ */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}

@media (prefers-contrast: high) {
    .confirmation-section,
    .form-container {
        border-width: 3px;
    }
    
    .confirmation-value,
    .status-badge {
        font-weight: 900;
    }
}

/* タッチデバイス最適化 */
@media (hover: none) and (pointer: coarse) {
    .confirm-button,
    .cancel-button,
    .back-button,
    .check-reservation-button {
        min-height: 44px;
        min-width: 44px;
    }
}

/* 高解像度ディスプレイ対応 */
@media (-webkit-min-device-pixel-ratio: 2), (min-resolution: 192dpi) {
    .header-logo img {
        image-rendering: -webkit-optimize-contrast;
        image-rendering: crisp-edges;
    }
}

/* 印刷対応 */
@media print {
    .main-header,
    .cancel-button,
    .back-button {
        display: none !important;
    }
    
    body {
        background: white !important;
        color: black !important;
    }
    
    .container {
        max-width: none;
        padding: 0;
    }
}

/* その他のブラウザ対応 */
iframe {
    border: none;
    width: 100%;
    height: auto;
}

@media (prefers-color-scheme: light) {
    body {
        color-scheme: dark;
    }
}
