/* 手機端專用樣式 - 登入和分店頁面 */

/* 基礎重置 */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Microsoft JhengHei', 'Arial', sans-serif;
}

body {
    background-color: #f8f9fa;
    color: #333;
    line-height: 1.6;
    font-size: 16px;
}

/* 登入頁面樣式 */
.login-container {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    background-color: #f8f9fa;
    padding: 1rem;
}

.logo-container {
    text-align: center;
    margin-bottom: 1.5rem;
}

.login-logo {
    max-width: 120px;
    height: auto;
    display: block;
    margin: 0 auto;
}

.login-box {
    width: 100%;
    max-width: 400px;
    padding: 2rem;
    border: 1px solid #e0e0e0;
    background-color: #fff;
    box-shadow: 0 0 15px rgba(0,0,0,0.05);
    border-radius: 8px;
}

.login-box h1 {
    text-align: center;
    margin-bottom: 1.5rem;
    color: #4CAF50;
    border-bottom: 2px solid #4CAF50;
    padding-bottom: 0.5rem;
    font-size: 1.5rem;
}

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

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: bold;
    font-size: 1rem;
}

.form-group input {
    width: 100%;
    padding: 0.8rem;
    border: 1px solid #ccc;
    font-size: 1rem;
    border-radius: 4px;
    -webkit-appearance: none;
    appearance: none;
}

.form-group input:focus {
    outline: none;
    border-color: #4CAF50;
    box-shadow: 0 0 0 2px rgba(76, 175, 80, 0.2);
}

.login-btn {
    width: 100%;
    padding: 0.8rem;
    background-color: #4CAF50;
    color: #fff;
    border: none;
    font-size: 1rem;
    cursor: pointer;
    transition: background-color 0.3s;
    border-radius: 4px;
    font-weight: bold;
}

.login-btn:hover {
    background-color: #388E3C;
}

.login-btn:active {
    background-color: #1565C0;
}

.error-message {
    color: #ff0000;
    text-align: center;
    margin-bottom: 1rem;
    padding: 0.5rem;
    border: 1px solid #ff0000;
    border-radius: 4px;
    background-color: #ffebee;
}

.change-password-btn {
    background-color: #f0f0f0;
    color: #333;
    border: 1px solid #ccc;
    padding: 0.6rem 1.2rem;
    font-size: 0.9rem;
    cursor: pointer;
    border-radius: 4px;
    transition: background-color 0.3s;
    width: 100%;
    margin-top: 1rem;
}

.change-password-btn:hover {
    background-color: #e0e0e0;
}

/* 分店頁面樣式 */
.header {
    background-color: #4CAF50;
    color: #fff;
    padding: 1rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.header h1 {
    font-size: 1.2rem;
    margin: 0;
}

.logout-btn {
    background-color: #fff;
    color: #4CAF50;
    border: none;
    padding: 0.5rem 1rem;
    cursor: pointer;
    border-radius: 4px;
    font-weight: bold;
    transition: background-color 0.3s;
}

.logout-btn:hover {
    background-color: #f0f0f0;
}

.container {
    padding: 1rem;
    max-width: 100%;
    margin: 0;
}

/* 分店選擇按鈕樣式 */
.button-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1.5rem;
    margin-top: 2rem;
    padding: 0 1rem;
}

.choice-button {
    width: 100%;
    max-width: 300px;
    padding: 1.5rem 2rem;
    font-size: 1.2rem;
    font-weight: bold;
    background-color: #4CAF50;
    color: white;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s;
    text-decoration: none;
    text-align: center;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.choice-button:hover {
    background-color: #388E3C;
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0,0,0,0.2);
}

.choice-button:active {
    transform: translateY(0);
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.welcome-message {
    text-align: center;
    margin-bottom: 2rem;
    padding: 0 1rem;
}

.welcome-message h2 {
    color: #4CAF50;
    margin-bottom: 0.5rem;
    font-size: 1.5rem;
}

.welcome-message p {
    color: #666;
    font-size: 1rem;
}

/* 分店訂單頁面樣式 */
.top-bar {
    background-color: #fff;
    padding: 1rem;
    border-radius: 8px;
    margin-bottom: 1rem;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.search-container {
    display: flex;
    gap: 0.5rem;
    margin-bottom: 1rem;
}

.search-input {
    flex: 1;
    padding: 0.8rem;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 1rem;
}

.search-input:focus {
    outline: none;
    border-color: #4CAF50;
    box-shadow: 0 0 0 2px rgba(76, 175, 80, 0.2);
}

.icon-button {
    padding: 0.8rem;
    background-color: #4CAF50;
    color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    transition: background-color 0.3s;
    display: flex;
    align-items: center;
    justify-content: center;
}

.icon-button:hover {
    background-color: #388E3C;
}

.mic-button {
    background-color: #4CAF50;
}

.mic-button:hover {
    background-color: #45a049;
}

.home-button {
    background-color: #666;
    padding: 0.6rem;
}

.home-button:hover {
    background-color: #555;
}

.info-container {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.info-box {
    background-color: #f0f0f0;
    padding: 0.5rem 1rem;
    border-radius: 4px;
    font-size: 0.9rem;
    border: 1px solid #ddd;
}

/* 版本資訊樣式 */
.version-info {
    text-align: center;
    margin-top: 1.5rem;
    padding: 0.5rem;
    color: #666;
    font-size: 0.85rem;
    border-top: 1px solid #e0e0e0;
}

/* PWA 安裝提示樣式 */
.install-banner {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    background: linear-gradient(135deg, #4CAF50, #388E3C);
    color: white;
    padding: 10px 12px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.2);
    z-index: 1000;
    animation: slideDown 0.3s ease-out;
}

.install-banner-content {
    display: flex;
    align-items: center;
    max-width: 1200px;
    margin: 0 auto;
    gap: 8px;
}

.install-banner-icon {
    flex-shrink: 0;
}

.install-icon {
    width: 32px;
    height: 32px;
    border-radius: 8px;
    border: 2px solid rgba(255,255,255,0.3);
}

.install-banner-text {
    flex: 1;
    min-width: 0;
}

.install-banner-text h3 {
    margin: 0;
    font-size: 14px;
    font-weight: 600;
    line-height: 1.2;
}

.install-banner-text p {
    margin: 2px 0 0 0;
    font-size: 12px;
    opacity: 0.9;
    line-height: 1.3;
    display: none; /* 手機版隱藏描述文字 */
}

.install-banner-actions {
    display: flex;
    gap: 8px;
    align-items: center;
}

.install-btn {
    background: rgba(255,255,255,0.2);
    color: white;
    border: 1px solid rgba(255,255,255,0.3);
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
    backdrop-filter: blur(10px);
}

.install-btn:hover {
    background: rgba(255,255,255,0.3);
    transform: translateY(-1px);
}

.dismiss-btn {
    background: none;
    color: white;
    border: none;
    font-size: 16px;
    width: 28px;
    height: 28px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.2s ease;
}

.dismiss-btn:hover {
    background: rgba(255,255,255,0.2);
}

@keyframes slideDown {
    from {
        transform: translateY(-100%);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

/* iOS 安裝指引樣式 */
.ios-install-guide {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0,0,0,0.8);
    z-index: 2000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.ios-install-content {
    background: white;
    border-radius: 12px;
    padding: 20px;
    max-width: 320px;
    text-align: center;
    position: relative;
    margin: 0 10px;
}

.ios-install-content h3 {
    color: #4CAF50;
    margin-bottom: 16px;
    font-size: 18px;
}

.ios-install-steps {
    text-align: left;
    margin: 16px 0;
}

.ios-install-steps li {
    margin: 8px 0;
    padding-left: 8px;
    font-size: 13px;
    line-height: 1.4;
}

.ios-close-btn {
    position: absolute;
    top: 12px;
    right: 12px;
    background: none;
    border: none;
    font-size: 24px;
    color: #666;
    cursor: pointer;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
}

.ios-close-btn:hover {
    background: #f0f0f0;
}

/* 觸控優化 */
@media (hover: none) and (pointer: coarse) {
    .choice-button:hover {
        background-color: #4CAF50;
        transform: none;
    }
    
    .login-btn:hover {
        background-color: #4CAF50;
    }
    
    .icon-button:hover {
        background-color: #4CAF50;
    }
    
    .mic-button:hover {
        background-color: #4CAF50;
    }
}

/* 小屏幕優化 */
@media (max-width: 480px) {
    .login-box {
        padding: 1.5rem;
        margin: 0.5rem;
    }
    
    .header {
        padding: 0.8rem;
        flex-direction: column;
        text-align: center;
    }
    
    .header h1 {
        font-size: 1.1rem;
        margin-bottom: 0.5rem;
    }
    
    .logout-btn {
        width: 100%;
        margin-top: 0.5rem;
    }
    
    .choice-button {
        padding: 1.2rem 1.5rem;
        font-size: 1.1rem;
    }
    
    .welcome-message h2 {
        font-size: 1.3rem;
    }
    
    .container {
        padding: 0.8rem;
    }
}