/* SandboxCafe 認証・ローディング機能スタイル */

/* 認証ローディング画面 */
#auth-loading {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, #f5f3f0 0%, #faf8f5 100%);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    z-index: 9999;
}

.auth-loading-content {
    text-align: center;
    color: #8B4513;
}

.auth-loading-content h2 {
    margin-bottom: 1rem;
    font-size: 1.5rem;
}

.auth-loading-spinner {
    width: 50px;
    height: 50px;
    border: 4px solid #E5D5C8;
    border-top: 4px solid #CD853F;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin: 2rem auto;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* 初期状態でメインコンテンツを非表示 */
.sandbox-cafe-container {
    visibility: hidden;
    opacity: 0;
    transition: opacity 0.5s ease-in-out;
}

/* 認証モーダル */
.auth-modal {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10000;
}

.auth-modal-content {
    background: white;
    border-radius: 10px;
    box-shadow: 0 4px 30px rgba(0, 0, 0, 0.2);
    width: 90%;
    max-width: 500px;
    max-height: 90vh;
    overflow-y: auto;
}

.auth-modal-header {
    padding: 20px 24px 0;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid #eee;
    margin-bottom: 20px;
}

.auth-modal-header h3 {
    margin: 0;
    color: #8B4513;
    font-size: 1.4rem;
}

.modal-close {
    background: none;
    border: none;
    font-size: 24px;
    color: #999;
    cursor: pointer;
    padding: 0;
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.modal-close:hover {
    color: #333;
}

.auth-modal-body {
    padding: 0 24px 24px;
}

.form-group {
    margin-bottom: 1.2rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    color: #8B4513;
    font-weight: 500;
}

.form-group label .required {
    color: #dc3545;
    margin-left: 2px;
}

.form-input, .form-select {
    width: 100%;
    padding: 10px 12px;
    border: 1px solid #ddd;
    border-radius: 5px;
    font-size: 14px;
    box-sizing: border-box;
}

.form-input:focus, .form-select:focus {
    outline: none;
    border-color: #CD853F;
    box-shadow: 0 0 0 2px rgba(205, 133, 63, 0.2);
}

.form-select {
    background-color: white;
    cursor: pointer;
}

.form-help {
    display: block;
    margin-top: 0.25rem;
    color: #666;
    font-size: 12px;
    line-height: 1.4;
}

.form-actions {
    display: flex;
    gap: 10px;
    justify-content: flex-end;
    margin-top: 1.5rem;
    padding-top: 1rem;
    border-top: 1px solid #eee;
}

.btn {
    padding: 10px 20px;
    border: none;
    border-radius: 5px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
}

.btn-primary {
    background: #CD853F;
    color: white;
}

.btn-primary:hover {
    background: #B8762D;
}

.btn-secondary {
    background: #f8f9fa;
    color: #6c757d;
    border: 1px solid #ddd;
}

.btn-secondary:hover {
    background: #e9ecef;
}

.auth-switch {
    text-align: center;
    margin-top: 1rem;
    padding-top: 1rem;
    border-top: 1px solid #eee;
}

.link-btn {
    background: none;
    border: none;
    color: #CD853F;
    cursor: pointer;
    text-decoration: underline;
    font-size: inherit;
}

.link-btn:hover {
    color: #B8762D;
}

/* 医療専門資格バッジ */
.medical-qualification-badge {
    display: inline-block;
    padding: 2px 8px;
    border-radius: 12px;
    font-size: 11px;
    font-weight: 500;
    color: white;
    margin-right: 4px;
    vertical-align: middle;
}

.medical-qualification-badge.badge-medium {
    padding: 4px 10px;
    font-size: 12px;
}

.medical-qualification-badge.badge-large {
    padding: 6px 12px;
    font-size: 13px;
}

/* ログインプロンプト画面 */
#login-prompt {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, #f5f3f0 0%, #faf8f5 100%);
    display: none;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    z-index: 9998;
}

.login-prompt-content {
    background: white;
    border-radius: 20px;
    padding: 3rem;
    max-width: 500px;
    width: 90%;
    text-align: center;
    box-shadow: 0 10px 30px rgba(139, 69, 19, 0.2);
    border: 2px solid #E5D5C8;
}

.login-prompt-content h2 {
    color: #8B4513;
    margin-bottom: 1rem;
    font-size: 1.8rem;
}

.login-prompt-content .subtitle {
    color: #A0522D;
    margin-bottom: 2rem;
    font-size: 1.1rem;
    line-height: 1.5;
}

.login-prompt-buttons {
    display: flex;
    gap: 1rem;
    margin-bottom: 2rem;
    flex-wrap: wrap;
}

.prompt-btn {
    flex: 1;
    padding: 1rem 2rem;
    border: none;
    border-radius: 12px;
    font-size: 1.1rem;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.3s ease;
    min-width: 140px;
}

.prompt-btn-primary {
    background: linear-gradient(135deg, #CD853F 0%, #D2B48C 100%);
    color: white;
    box-shadow: 0 4px 15px rgba(205, 133, 63, 0.3);
}

.prompt-btn-primary:hover {
    background: linear-gradient(135deg, #B8860B 0%, #CD853F 100%);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(205, 133, 63, 0.4);
}

.prompt-btn-secondary {
    background: linear-gradient(135deg, #8B4513 0%, #A0522D 100%);
    color: white;
    box-shadow: 0 4px 15px rgba(139, 69, 19, 0.3);
}

.prompt-btn-secondary:hover {
    background: linear-gradient(135deg, #654321 0%, #8B4513 100%);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(139, 69, 19, 0.4);
}

.prompt-btn-outline {
    background: white;
    color: #8B4513;
    border: 2px solid #CD853F;
}

.prompt-btn-outline:hover {
    background: #F5E6D3;
    transform: translateY(-1px);
}

.login-prompt-features {
    background: linear-gradient(135deg, #F5E6D3 0%, #FAF0E6 100%);
    border-radius: 12px;
    padding: 1.5rem;
    margin-bottom: 1.5rem;
    text-align: left;
}

.login-prompt-features h3 {
    color: #8B4513;
    margin-bottom: 1rem;
    font-size: 1.2rem;
}

.login-prompt-features ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.login-prompt-features li {
    padding: 0.3rem 0;
    color: #5D4037;
    position: relative;
    padding-left: 1.5rem;
}

.login-prompt-features li::before {
    content: '☕';
    position: absolute;
    left: 0;
    color: #CD853F;
}

/* 機能制限通知 */
.restricted-feature {
    background: linear-gradient(135deg, #FFF3E0 0%, #FFE0B2 100%);
    border: 2px solid #FFB74D;
    border-radius: 12px;
    padding: 2rem;
    text-align: center;
    color: #E65100;
    margin: 1rem 0;
}

.restricted-feature h3 {
    color: #BF360C;
    margin-bottom: 1rem;
    font-size: 1.3rem;
}

.restricted-feature p {
    margin-bottom: 1.5rem;
    line-height: 1.6;
}

.upgrade-btn {
    background: linear-gradient(135deg, #FF9800 0%, #F57C00 100%);
    color: white;
    border: none;
    padding: 1rem 2rem;
    border-radius: 10px;
    font-size: 1.1rem;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.3s ease;
    text-decoration: none;
    display: inline-block;
}

.upgrade-btn:hover {
    background: linear-gradient(135deg, #F57C00 0%, #E65100 100%);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(255, 152, 0, 0.4);
}

/* ローディング状態 */
.loading {
    pointer-events: none;
    opacity: 0.6;
}

.loading::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 20px;
    height: 20px;
    border: 2px solid #E5D5C8;
    border-top: 2px solid #CD853F;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    transform: translate(-50%, -50%);
}

/* ユーティリティクラス */
.hidden {
    display: none !important;
}

.visible {
    display: block !important;
}

.fade-in {
    opacity: 1 !important;
    visibility: visible !important;
}

.fade-out {
    opacity: 0 !important;
    visibility: hidden !important;
}

/* レスポンシブデザイン（認証画面用） */
@media (max-width: 768px) {
    .login-prompt-content {
        padding: 2rem;
        margin: 1rem;
    }
    
    .login-prompt-buttons {
        flex-direction: column;
    }
    
    .prompt-btn {
        min-width: auto;
    }
}