/* BellaBello User Management Plugin Styles */

/* ==================== 基礎樣式 ==================== */

.bb-registration-form,
.bb-login-form,
.bb-forgot-password-form {
    max-width: 400px;
    margin: 0 auto;
    padding: 30px;
    background: #fff;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
}

.bb-form-group {
    margin-bottom: 20px;
}

.bb-form-group label {
    display: block;
    margin-bottom: 5px;
    font-weight: 600;
    color: #333;
    font-size: 14px;
}

.bb-form-group input,
.bb-form-group select,
.bb-form-group textarea {
    width: 100%;
    padding: 12px 15px;
    border: 2px solid #e1e5e9;
    border-radius: 6px;
    font-size: 14px;
    transition: border-color 0.3s ease, box-shadow 0.3s ease;
    box-sizing: border-box;
}

.bb-form-group input:focus,
.bb-form-group select:focus,
.bb-form-group textarea:focus {
    outline: none;
    border-color: #007cba;
    box-shadow: 0 0 0 3px rgba(0, 124, 186, 0.1);
}

.bb-form-group input.bb-field-error {
    border-color: #dc3232;
    box-shadow: 0 0 0 3px rgba(220, 50, 50, 0.1);
}

.bb-field-error-message {
    display: block;
    color: #dc3232;
    font-size: 12px;
    margin-top: 5px;
}

/* ==================== 按鈕樣式 ==================== */

.bb-submit-btn,
.bb-btn {
    display: inline-block;
    width: 100%;
    padding: 12px 20px;
    background: #007cba;
    color: white;
    border: none;
    border-radius: 6px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: background-color 0.3s ease, transform 0.1s ease;
    text-align: center;
    text-decoration: none;
}

.bb-submit-btn:hover,
.bb-btn:hover {
    background: #005a87;
    transform: translateY(-1px);
}

.bb-submit-btn:active,
.bb-btn:active {
    transform: translateY(0);
}

.bb-submit-btn:disabled,
.bb-btn:disabled {
    background: #ccc;
    cursor: not-allowed;
    transform: none;
}

.bb-btn-secondary {
    background: #666;
}

.bb-btn-secondary:hover {
    background: #555;
}

.bb-btn-cancel {
    background: #dc3232;
}

.bb-btn-cancel:hover {
    background: #a00;
}

/* ==================== 社交登錄 ==================== */

.bb-social-login {
    margin-top: 25px;
}

.bb-divider {
    text-align: center;
    margin: 20px 0;
    position: relative;
}

.bb-divider::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 0;
    right: 0;
    height: 1px;
    background: #e1e5e9;
    z-index: 1;
}

.bb-divider span {
    background: white;
    padding: 0 15px;
    color: #666;
    font-size: 14px;
    position: relative;
    z-index: 2;
}

.bb-social-buttons {
    display: grid;
    gap: 10px;
}

.bb-social-btn {
    width: 100%;
    padding: 12px;
    border: 2px solid #e1e5e9;
    background: white;
    color: #333;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
}

.bb-social-btn:hover {
    background: #f8f9fa;
    border-color: #007cba;
    transform: translateY(-1px);
}

.bb-social-google {
    border-color: #db4437;
    color: #db4437;
}

.bb-social-google:hover {
    background: #db4437;
    color: white;
}

.bb-social-facebook {
    border-color: #4267B2;
    color: #4267B2;
}

.bb-social-facebook:hover {
    background: #4267B2;
    color: white;
}

.bb-social-wechat {
    border-color: #07C160;
    color: #07C160;
}

.bb-social-wechat:hover {
    background: #07C160;
    color: white;
}

.bb-social-line {
    border-color: #00B900;
    color: #00B900;
}

.bb-social-line:hover {
    background: #00B900;
    color: white;
}

/* ==================== 訊息樣式 ==================== */

.bb-message {
    margin: 20px 0;
    padding: 15px;
    border-radius: 6px;
    font-size: 14px;
    line-height: 1.5;
}

.bb-message p {
    margin: 0;
}

.bb-message.bb-success {
    background: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

.bb-message.bb-error {
    background: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

.bb-message.bb-info {
    background: #d1ecf1;
    color: #0c5460;
    border: 1px solid #bee5eb;
}

/* ==================== 表單切換 ==================== */

.bb-form-footer {
    text-align: center;
    margin-top: 20px;
    padding-top: 20px;
    border-top: 1px solid #e1e5e9;
}

.bb-login-link,
.bb-forgot-password-link {
    color: #007cba;
    text-decoration: none;
    font-size: 14px;
    font-weight: 500;
}

.bb-login-link:hover,
.bb-forgot-password-link:hover {
    text-decoration: underline;
}

/* ==================== 密碼強度指示器 ==================== */

.bb-password-strength {
    margin-top: 5px;
    padding: 5px 10px;
    border-radius: 4px;
    font-size: 12px;
    font-weight: 600;
}

.bb-password-strength.weak {
    background: #f8d7da;
    color: #721c24;
}

.bb-password-strength.medium {
    background: #fff3cd;
    color: #856404;
}

.bb-password-strength.strong {
    background: #d4edda;
    color: #155724;
}

/* ==================== 綁定對話框 ==================== */

.bb-binding-dialog {
    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: 9999;
}

.bb-binding-content {
    background: white;
    padding: 30px;
    border-radius: 8px;
    max-width: 400px;
    text-align: center;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
}

.bb-binding-content h3 {
    margin-top: 0;
    margin-bottom: 15px;
    color: #333;
}

.bb-binding-content p {
    margin-bottom: 25px;
    color: #666;
    line-height: 1.5;
}

.bb-binding-content .bb-btn {
    width: auto;
    margin: 5px;
    padding: 10px 20px;
    display: inline-block;
}

/* ==================== 複選框和單選框 ==================== */

.bb-form-group fieldset {
    border: none;
    padding: 0;
    margin: 0;
}

.bb-form-group fieldset label {
    display: flex;
    align-items: center;
    margin-bottom: 10px;
    font-weight: normal;
    cursor: pointer;
}

.bb-form-group fieldset input[type="checkbox"],
.bb-form-group fieldset input[type="radio"] {
    width: auto;
    margin-right: 8px;
    margin-bottom: 0;
}

/* ==================== 響應式設計 ==================== */

@media (max-width: 480px) {
    .bb-registration-form,
    .bb-login-form,
    .bb-forgot-password-form {
        margin: 20px;
        padding: 20px;
    }
    
    .bb-social-buttons {
        grid-template-columns: 1fr;
    }
    
    .bb-binding-content {
        margin: 20px;
        padding: 20px;
    }
    
    .bb-binding-content .bb-btn {
        width: 100%;
        margin: 5px 0;
    }
}

@media (min-width: 481px) and (max-width: 768px) {
    .bb-social-buttons {
        grid-template-columns: repeat(2, 1fr);
    }
}

/* ==================== 管理員頁面樣式 ==================== */

.bb-admin-dashboard {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 20px;
    margin-top: 20px;
}

.bb-admin-card {
    background: #fff;
    border: 1px solid #ccd0d4;
    border-radius: 4px;
    padding: 20px;
    box-shadow: 0 1px 1px rgba(0,0,0,.04);
}

.bb-admin-card h3 {
    margin-top: 0;
    color: #23282d;
    font-size: 18px;
}

.bb-admin-card p {
    color: #666;
    line-height: 1.5;
    margin-bottom: 15px;
}

/* ==================== 載入動畫 ==================== */

.bb-loading {
    display: inline-block;
    width: 16px;
    height: 16px;
    border: 2px solid #f3f3f3;
    border-top: 2px solid #007cba;
    border-radius: 50%;
    animation: bb-spin 1s linear infinite;
    margin-right: 8px;
}

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

/* ==================== 工具提示 ==================== */

.bb-tooltip {
    position: relative;
    display: inline-block;
    cursor: help;
}

.bb-tooltip .bb-tooltip-text {
    visibility: hidden;
    width: 200px;
    background-color: #333;
    color: #fff;
    text-align: center;
    border-radius: 6px;
    padding: 8px;
    position: absolute;
    z-index: 1;
    bottom: 125%;
    left: 50%;
    margin-left: -100px;
    opacity: 0;
    transition: opacity 0.3s;
    font-size: 12px;
    line-height: 1.4;
}

.bb-tooltip .bb-tooltip-text::after {
    content: "";
    position: absolute;
    top: 100%;
    left: 50%;
    margin-left: -5px;
    border-width: 5px;
    border-style: solid;
    border-color: #333 transparent transparent transparent;
}

.bb-tooltip:hover .bb-tooltip-text {
    visibility: visible;
    opacity: 1;
}

/* ==================== 表單群組布局 ==================== */

.bb-form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 15px;
}

@media (max-width: 480px) {
    .bb-form-row {
        grid-template-columns: 1fr;
    }
}

/* ==================== 進度條 ==================== */

.bb-progress {
    width: 100%;
    height: 4px;
    background: #e1e5e9;
    border-radius: 2px;
    overflow: hidden;
    margin: 10px 0;
}

.bb-progress-bar {
    height: 100%;
    background: #007cba;
    transition: width 0.3s ease;
}

/* ==================== 切換開關 ==================== */

.bb-toggle {
    position: relative;
    display: inline-block;
    width: 50px;
    height: 24px;
}

.bb-toggle input {
    opacity: 0;
    width: 0;
    height: 0;
}

.bb-toggle-slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: #ccc;
    transition: .4s;
    border-radius: 24px;
}

.bb-toggle-slider:before {
    position: absolute;
    content: "";
    height: 18px;
    width: 18px;
    left: 3px;
    bottom: 3px;
    background-color: white;
    transition: .4s;
    border-radius: 50%;
}

.bb-toggle input:checked + .bb-toggle-slider {
    background-color: #007cba;
}

.bb-toggle input:checked + .bb-toggle-slider:before {
    transform: translateX(26px);
}

/* ==================== 標籤樣式 ==================== */

.bb-tag {
    display: inline-block;
    padding: 4px 8px;
    background: #f0f0f1;
    color: #333;
    border-radius: 3px;
    font-size: 12px;
    margin-right: 5px;
    margin-bottom: 5px;
}

.bb-tag.bb-tag-success {
    background: #d4edda;
    color: #155724;
}

.bb-tag.bb-tag-warning {
    background: #fff3cd;
    color: #856404;
}

.bb-tag.bb-tag-error {
    background: #f8d7da;
    color: #721c24;
}

/* ==================== 打印樣式 ==================== */

@media print {
    .bb-social-login,
    .bb-binding-dialog,
    .bb-message {
        display: none !important;
    }
    
    .bb-registration-form,
    .bb-login-form,
    .bb-forgot-password-form {
        box-shadow: none;
        border: 1px solid #ccc;
    }
} 