/* server/static/login.css */

body {
    font-family: Arial, sans-serif;
    /*background-image: url('https://www.kanazawa-it.ac.jp/h1s/images/common/page_title/page_title_sotsugyosei_2x.jpg');*/
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    background-attachment: fixed;
    background-color: #E0FFFF;
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    margin: 0;
    box-sizing: border-box; /* Include padding in height calculation */
}

.login-container {
    background-color: rgba(255, 255, 255, 0.9); /* Slightly more opaque */
    padding: 0; /* Padding handled by columns */
    border-radius: 500px; /* Large value for capsule shape */
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.25);
    width: 90%;
    max-width: 800px; /* Wider max-width for two columns */
    position: relative; /* Changed from hidden to relative if needed */
    overflow: hidden; /* Keep contents within rounded corners */
    display: flex;
    align-items: stretch; /* Make columns equal height */
}

/* --- Left Column Styles --- */
.login-left-column {
    flex-basis: 30%; /* Adjust width ratio as needed */
    background-color: rgba(240, 248, 255, 0.85); /* Optional subtle background */
    padding: 40px 30px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    border-radius: 100px 0 0 100px; /* Round left corners */
    text-align: center; /* Center align text elements */
}

.logo-image {
    max-width: 150px;
    height: auto;
    margin-bottom: 30px;
}

.about-link {
    color: #007bff;
    text-decoration: none;
    font-weight: bold;
    font-size: 1.1em;
    margin-bottom: 30px;
    transition: color 0.2s ease;
}
.about-link:hover {
    color: #0056b3;
    text-decoration: underline;
}

.social-icons-container {
    display: flex;
    gap: 20px;
}

.social-icon {
    width: 28px; /* デフォルトサイズ */
    height: 28px;
    opacity: 0.8;
    transition: opacity 0.2s ease, transform 0.2s ease; /* transform も追加 */
    vertical-align: middle; /* 他の要素と並んだ際の縦位置を中央揃え */
    display: inline-block; /* 余白を適用しやすくする */
    object-fit: contain; /* 画像のアスペクト比を維持 */
}
.social-icon:hover {
    opacity: 1;
    transform: scale(1.1); /* 例: 少し拡大する共通ホバーエフェクト */
}


/* --- Right Column Styles --- */
.login-right-column {
    flex-basis: 70%; /* Adjust width ratio */
    padding: 50px 60px;
    text-align: center;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

/* Styles for elements within the right column */
.login-right-column h1 {
    color: #00BFFF;
    margin-top: 0;
    margin-bottom: 25px;
}

.login-right-column .form-group {
    margin-bottom: 20px;
    text-align: left;
}

.login-right-column .form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: bold;
    color: #555;
}

.login-right-column .form-group input {
    width: 100%;
    box-sizing: border-box;
    padding: 10px 40px 10px 10px; /* Space for eye icon */
    border: 1px solid #ddd;
    border-radius: 5px;
    font-size: 16px;
}

.login-right-column button[type="submit"] {
    background-color: #00BFFF;
    color: white;
    padding: 12px 25px;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    font-size: 18px;
    font-weight: bold;
    transition: background-color 0.3s ease;
    width: 100%;
    margin-top: 10px;
}

.login-right-column button[type="submit"]:hover {
    background-color: #009ACD;
}

.login-right-column .message {
    margin-top: 20px;
    font-weight: bold;
    min-height: 1.2em;
}

.login-right-column .message.success {
    color: green;
}

.login-right-column .message.error { color: red; }

.login-right-column .extra-links {
    margin-top: 15px;
    font-size: 14px;
}

.login-right-column .extra-links a {
    color: #007bff;
    text-decoration: none;
    margin: 0 10px;
    cursor: pointer;
    display: inline-flex; /* Align items if icons were used */
    align-items: center;
}
.login-right-column .extra-links a:hover {
    text-decoration: underline;
}

/* Password visibility toggle icon */
.password-wrapper {
    position: relative;
}
.toggle-password-icon {
    position: absolute;
    top: 50%;
    right: 15px;
    transform: translateY(-50%);
    cursor: pointer;
    width: 20px;
    height: 20px;
    opacity: 0.7;
}

/* --- Modal styles --- */
.modal-overlay {
    position: fixed; top: 0; left: 0; width: 100%; height: 100%;
    background-color: rgba(0, 0, 0, 0.6); display: flex; justify-content: center;
    align-items: center; z-index: 2000;
}
.modal-content {
    background-color: white; padding: 20px 30px; border-radius: 8px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.3); width: 90%; max-width: 700px;
    max-height: 85%; position: relative; display: flex; flex-direction: column;
}
.modal-close-button {
    position: absolute; top: 10px; right: 15px; font-size: 28px;
    font-weight: bold; color: #aaa; cursor: pointer; line-height: 1;
}
.modal-close-button:hover { color: #333; }
.modal-content h2 {
    text-align: center; color: #00BFFF; margin-top: 0; padding-bottom: 10px;
    border-bottom: 2px solid #eee; flex-shrink: 0;
}
.terms-text-box {
    flex-grow: 1; overflow-y: auto; text-align: left; font-size: 14px;
    line-height: 1.6; padding-right: 15px; margin-top: 15px;
}
.terms-text-box h4 { margin-top: 20px; margin-bottom: 5px; color: #333; }
.terms-text-box p, .terms-text-box ol, .terms-text-box ul { margin-top: 5px; margin-bottom: 10px; color: #555; }
.terms-text-box li { margin-bottom: 5px; }
.modal-agree-button {
    width: 100%; padding: 12px; margin-top: 20px; background-color: #007bff;
    color: white; border: none; border-radius: 5px; font-size: 16px; cursor: pointer;
}
.modal-agree-button:hover { background-color: #0056b3; }

/* --- Cookie Consent Banner Styles --- */
#cookieConsentBanner {
    display: none;
    position: fixed;
    bottom: 0;
    left: 0;
    width: 100%;
    background-color: rgba(0, 0, 0, 0.85);
    color: white;
    padding: 15px 5%;
    z-index: 3000;
    font-size: 14px;
    box-shadow: 0 -2px 5px rgba(0,0,0,0.2);
    box-sizing: border-box;

    display: flex;
    align-items: center;
    justify-content: center;
    gap: 20px; /* Increased gap */
    flex-wrap: wrap;
    text-align: center;
}
#cookieConsentBanner p { margin: 0; }
#cookieConsentBanner a {
    color: #00BFFF;
    text-decoration: underline;
    cursor: pointer;
}
#acceptCookieButton {
    background-color: #00BFFF;
    color: white;
    border: none;
    padding: 8px 20px;
    border-radius: 5px;
    cursor: pointer;
    font-weight: bold;
    flex-shrink: 0;
    transition: background-color 0.2s ease;
}
#acceptCookieButton:hover { background-color: #009ACD; }

/* Add padding to the bottom of the body ONLY when the banner is visible */
body:has(#cookieConsentBanner[style*="display: flex"]) {
  padding-bottom: 120px; /* Adjust this value as needed */
}

/* --- Responsive Styles --- */
@media (max-width: 768px) {
    .login-container {
        flex-direction: column; /* Stack columns vertically */
        border-radius: 50px; /* Keep consistent rounding */
        max-width: 400px;
        width: 90%;
        padding: 0; /* Reset padding */
    }
    .login-left-column {
        flex-basis: auto;
        border-radius: 50px 50px 0 0; /* Round top corners */
        padding: 30px;
    }
    .login-right-column {
        flex-basis: auto;
        border-radius: 0 0 50px 50px; /* Round bottom corners */
        padding: 30px;
    }
    /* Adjust element sizes for mobile */
    .logo-image { max-width: 120px; margin-bottom: 20px;}
    .about-link { margin-bottom: 20px; }
    .social-icons-container { gap: 15px; }
    .social-icon { width: 28px; height: 28px; }

    /* Cookie banner on small screens */
    #cookieConsentBanner { padding: 15px; }
    #cookieConsentBanner p { width: 100%; margin-bottom: 10px; }
    #acceptCookieButton { width: auto; padding: 8px 30px; }

    /* Adjust body padding for small screens with banner */
    body:has(#cookieConsentBanner[style*="display: flex"]) {
      padding-bottom: 180px; /* Increase padding for taller banner */
    }
}