@import 'base.css';

/* 基本樣式 */
li {
    list-style-type: none;
}

/* Header 樣式 */
.header {
    padding: 20px 0;
    background-color: transparent;
}

.header-wrap {
    display: flex;
    align-items: center;
}

.header-wrap .sub {
    margin-left: 20px;
}

.header-wrap .sub span {
    display: block;
    line-height: 1.2;
}

.header-wrap .sub .sm {
    font-size: 18px;
    color: #666;
}

.header-wrap .sub .md {
    font-size: 26px;
    color: var(--primary-color);
    font-weight: bold;
}

/* 表單基本樣式 */
.form-group {
    margin-bottom: 1rem;
}

.form-label {
    display: block;
    margin-bottom: 0.5rem;
    color: var(--text-secondary);
    font-weight: 500;
}

.form-control {
    display: block;
    width: 100%;
    padding: 0.375rem 0.75rem;
    font-size: 1rem;
    line-height: 1.5;
    color: #495057;
    background-color: #fff;
    background-clip: padding-box;
    border: 1px solid #ced4da;
    border-radius: 0.25rem;
    transition: border-color 0.15s ease-in-out, box-shadow 0.15s ease-in-out;
}

.form-control:focus {
    color: #495057;
    background-color: #fff;
    border-color: var(--primary-color);
    outline: 0;
    box-shadow: 0 0 0 0.2rem rgba(32, 76, 143, 0.25);
}

.alert {
    position: relative;
    padding: 0.75rem 1.25rem;
    margin-bottom: 1rem;
    border: 1px solid transparent;
    border-radius: 0.25rem;
}

.alert-success {
    color: #155724;
    background-color: #d4edda;
    border-color: #c3e6cb;
}

/* 標題區塊樣式 */
.title-wrap {
    display: flex;
    align-items: center;
    margin: 40px 0;
    padding: 0 40px;
    height: 100px;
    position: relative;
    background: linear-gradient(45deg, #e0e0e0 25%, #ffffff 25%);
    background-size: 3px 3px;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.title-wrap::after {
    background-color: var(--primary-color);
    width: 2.5rem;
    left: -2.5rem;
    content: "";
    position: absolute;
    top: 0;
    bottom: 0;
    border-radius: 8px 0 0 8px;
}

/* 登入頁面樣式 */
body.login-page {
    background-color: #f8f9fa;
    min-height: 100vh;
}

.login-wrap {
    margin: 0 auto;
    width: 100%;
    max-width: 480px;
    padding: 40px;
    background-color: #fff;
    border-radius: 8px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.login-wrap .section-title {
    text-align: center;
    margin-bottom: 2rem;
}

.login-wrap .section-title h4 {
    font-size: 26px;
    font-weight: bold;
    color: var(--primary-color);
}

.login-wrap .section-sso {
    text-align: center;
    padding: 20px 0;
}

.login-wrap .section-sso .btn-login {
    display: inline-block;
    min-width: 200px;
    height: 48px;
    line-height: 48px;
    padding: 0 2rem;
    font-size: 1.1rem;
    font-weight: 500;
}

.login-form {
    text-align: left;
}

.login-form .form-group {
    margin-bottom: 1.5rem;
}

.login-form .form-control {
    height: 48px;
    padding: 0.75rem 1rem;
    font-size: 1rem;
    border: 1px solid #ced4da;
    border-radius: 6px;
    transition: all 0.2s ease-in-out;
}

.login-form .form-control:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 0.2rem rgba(32, 76, 143, 0.25);
}

.btn-login,
.btn-login:visited {
    width: 100%;
    height: 48px;
    font-size: 1.1rem;
    font-weight: 500;
    background-color: var(--primary-color);
    border: none;
    border-radius: 6px;
    transition: all 0.2s ease-in-out;
    color: #fff;
    text-align: center;
    display: block;
    text-decoration: none;
}

.btn-login:hover,
.btn-login:focus {
    background-color: var(--primary-light);
    color: #fff;
    text-decoration: none;
    transform: translateY(-1px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

.btn-login i {
    color: #fff;
    margin-right: 0.5em;
}

/* 驗證碼樣式 */
.captcha-wrap {
    display: flex;
    align-items: center;
    gap: 10px;
}

.captcha-wrap input {
    flex: 1;
}

.captcha-image {
    display: flex;
    align-items: center;
}

.captcha-image img {
    height: 48px;
    border: 1px solid #ced4da;
    border-radius: 6px;
}

/* 註冊步驟樣式 */
.registration-steps {
    padding: 0.5rem 0;
}

.step-item {
    display: flex;
    align-items: flex-start;
    gap: 1rem;
    padding: 0.5rem 0;
}

.step-number {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 24px;
    height: 24px;
    background-color: var(--primary-color);
    color: white;
    border-radius: 50%;
    font-size: 0.9rem;
    font-weight: bold;
    flex-shrink: 0;
}

.step-text {
    font-size: 1rem;
    line-height: 1.5;
    color: var(--text-secondary);
    flex: 1;
}

.registration-info {
    background-color: var(--bg-lighter);
    border: 1px solid #e9ecef;
    border-radius: 8px;
    padding: 1.5rem;
    text-align: left;
}

.registration-info .alert-heading {
    color: var(--primary-color);
    font-size: 1.2rem;
    font-weight: bold;
    margin-bottom: 1rem;
    text-align: left;
}

.registration-info p {
    text-align: left;
    margin-bottom: 0.5rem;
}

/* 忘記密碼連結樣式 */
.forgot-password-link {
    color: #888;
    font-size: 0.93em;
    text-decoration: none;
    transition: color 0.2s;
}

.forgot-password-link:hover {
    color: var(--primary-color);
    text-decoration: underline;
}

/* SSO 按鈕樣式 */
.btn-info.btn-login,
.btn-info.btn-login:visited {
    background-color: #17a2b8;
    border-color: #17a2b8;
    color: #fff;
}

.btn-info.btn-login:hover,
.btn-info.btn-login:focus {
    background-color: #138496;
    border-color: #138496;
    color: #fff;
}

.registration-section .divider {
    position: relative;
    text-align: center;
    margin: 1.5rem 0;
}

.registration-section .divider::before,
.registration-section .divider::after {
    content: "";
    position: absolute;
    top: 50%;
    width: 45%;
    height: 1px;
    background-color: #dee2e6;
}

.registration-section .divider::before {
    left: 0;
}

.registration-section .divider::after {
    right: 0;
}

.registration-section .divider span {
    background-color: #fff;
    padding: 0 1rem;
    color: #6c757d;
    position: relative;
    z-index: 1;
}

/* 家長登入專用按鈕樣式 */
.btn-parent-login,
.btn-parent-login:visited {
    background-color: #17a2b8;
    border-color: #17a2b8;
    color: #fff;
}

.btn-parent-login:hover,
.btn-parent-login:focus {
    background-color: #138496;
    border-color: #138496;
    color: #fff;
}

.btn-login {
    display: flex;
    align-items: center;
    justify-content: center;
}
