/* Member Manager Styles - Only directives used in the script */

:root {
    --primary-blue: #1e4a6b;
    --secondary-blue: #2c6b8f;
    --light-blue: #e6f0f7;
    --primary-green: #2c6b2c;
    --secondary-green: #3f8f3f;
    --light-green: #e8f3e8;
    --accent-red: #900;
    --light-red: #fcc;
    --background-beige: #f5f0e6;
    --panel-beige: #faf7f0;
    --text-dark: #1a2c3f;
    --text-light: #faf0e6;
    --border-color: #c0b09c;
    --faded-text: #5f6b7a;
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    max-width: 825px;
    margin: 0 auto;
    padding: 20px;
    background-color: var(--background-beige);
    color: var(--text-dark);
    line-height: 1.6;
}

/* Header Styles */
header {
    background: linear-gradient(135deg, var(--primary-blue), var(--secondary-blue));
    color: var(--text-light);
    padding: 20px;
    border-radius: 8px;
    box-shadow: 0 4px 6px rgba(0, 40, 60, 0.2);
    border-bottom: 3px solid var(--primary-green);
    margin-bottom: 25px;
}

.header-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

/* Header with flag layout - prevents text wrapping */
.header-with-flag {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    flex-wrap: nowrap;
}

.header-flag {
    flex-shrink: 0;
    width: auto;
    height: 50px;
    object-fit: contain;
}

.header-title {
    flex: 1;
    text-align: center;
    white-space: nowrap;
    font-size: 2.2rem;
    margin: 0;
    line-height: 1.2;
    color: var(--text-light);
    text-shadow: 1px 1px 2px rgba(0,0,0,0.2);
}

.logout-link {
    flex-shrink: 0;
    white-space: nowrap;
    color: var(--text-light);
    background: rgba(255,255,255,0.2);
    padding: 8px 15px;
    border-radius: 4px;
    text-decoration: none;
    font-weight: 500;
    transition: all 0.3s ease;
}

.logout-link:hover {
    background: rgba(255,255,255,0.3);
    transform: translateY(-2px);
}

h1 {
    font-size: 2.2rem;
    color: var(--text-light);
    text-shadow: 1px 1px 2px rgba(0,0,0,0.2);
    margin: 0;
}

h1.login {
    font-size: 2.2rem;
    color: var(--text-light);
    text-shadow: 1px 1px 2px rgba(0,0,0,0.2);
    margin: 0;
}

/* Login header specific */
.login-header {
    text-align: center;
}

.login-header .header-with-flag {
    justify-content: center;
}

.login-header .header-title {
    font-size: 2.2rem;
    white-space: nowrap;
}

h2 {
    color: var(--primary-blue);
    margin-bottom: 15px;
    padding-bottom: 8px;
    border-bottom: 2px solid var(--primary-blue);
}

h3 {
    color: var(--primary-blue);
    margin-bottom: 10px;
    font-size: 1.1rem;
}

/* Form Containers */
.form-container {
    background: var(--panel-beige);
    padding: 25px;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0, 40, 60, 0.1);
    margin-bottom: 25px;
    border: 1px solid var(--border-color);
}

.form-text {
    margin-bottom: 15px;
    color: var(--faded-text);
}

/* Form Groups */
.form-group {
    margin-bottom: 20px;
}

label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    color: var(--primary-blue);
}

label.required::after {
    content: " *";
    color: var(--primary-blue);
    font-weight: bold;
}

/* Input Fields */
input[type="text"],
input[type="password"] {
    width: 100%;
    max-width: 40ch;
    padding: 12px;
    border: 1px solid var(--border-color);
    border-radius: 4px;
    font-size: 16px;
    transition: border-color 0.3s;
    background-color: white;
}

input:focus {
    border-color: var(--primary-blue);
    outline: none;
    box-shadow: 0 0 0 3px rgba(30, 74, 107, 0.1);
}

/* Help Text */
.help-text {
    font-size: 0.9em;
    color: var(--faded-text);
    margin-top: 5px;
}

/* Button Containers */
.btn-container {
    display: flex;
    justify-content: center;
    gap: 15px;
    margin: 25px 0;
    flex-wrap: wrap;
}

button {
    padding: 12px 20px;
    color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-weight: 600;
    font-size: 16px;
    transition: all 0.3s ease;
    min-width: 140px;
    text-align: center;
}

.submit-btn {
    background: linear-gradient(135deg, var(--primary-green), var(--secondary-green));
}

.submit-btn:hover {
    background: linear-gradient(135deg, var(--secondary-green), var(--primary-green));
    transform: translateY(-2px);
    box-shadow: 0 2px 5px rgba(44, 107, 44, 0.3);
}

.reset-btn {
    background: linear-gradient(135deg, var(--primary-blue), var(--secondary-blue));
}

.reset-btn:hover {
    background: linear-gradient(135deg, var(--secondary-blue), var(--primary-blue));
    transform: translateY(-2px);
}

/* Collapsible Note Styles */
.note-container {
    margin-bottom: 25px;
}

.note-button-container {
	text-align:center;
	margin:10px 0;
}

.note-toggle {
    padding: 12px 20px;
    color: white;
    background-color: var(--primary-green);
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-weight: 600;
    font-size: 16px;
    transition: all 0.3s ease;
    min-width: 140px;
    text-align: center;
}

.note-toggle:hover {
    background-color: var(--secondary-green);
    transform: translateY(-2px);
}

.toggle-icon {
    font-size: 20px;
    font-weight: bold;
    padding:5px 0;
}

.note-content {
    background: var(--panel-beige);
    border: 1px solid var(--border-color);
    border-top: none;
    border-radius: 0 0 8px 8px;
    padding: 20px;
    margin-top: 0;
    display: none;
}

.note-content.open {
    display: block;
}

.note-content p {
    margin: 10px 0;
    line-height: 1.6;
}

.note-content ul {
    margin: 10px 0 10px 20px;
}

.note-content li {
    margin: 8px 0;
}

.note-content code {
    background: var(--light-blue);
    padding: 2px 6px;
    border-radius: 3px;
    font-family: monospace;
    font-size: 0.9em;
    color: var(--primary-blue);
}

.note-content .member-rules {
    background: var(--light-blue);
    padding: 15px;
    border-radius: 4px;
    margin: 15px 0;
    border-left: 4px solid var(--primary-blue);
}

/* Message Boxes */
.error {
    background: var(--light-red);
    color: var(--accent-red);
    padding: 15px;
    border-radius: 4px;
    margin: 20px 0;
    border-left: 4px solid var(--accent-red);
}

.success {
    background: var(--light-green);
    color: var(--primary-green);
    padding: 15px;
    border-radius: 4px;
    margin: 20px 0;
    border-left: 4px solid var(--primary-green);
}

/* Info Box */
.info-box {
    background: var(--panel-beige);
    padding: 20px;
    border-radius: 8px;
    border: 1px solid var(--border-color);
    margin-top: 20px;
}

.info-box strong {
    color: var(--primary-blue);
    display: block;
    margin-bottom: 10px;
}

.info-box p {
    margin: 10px 0;
    color: var(--text-dark);
}

/* Member Info Box */
.member-info {
    background: var(--light-blue);
    padding: 15px;
    border-radius: 4px;
    margin-bottom: 20px;
    border-left: 4px solid var(--primary-blue);
}

.member-info p {
    margin: 5px 0;
}

/* Example Box */
.example-box {
    background: var(--panel-beige);
    border: 1px solid var(--border-color);
    border-radius: 4px;
    padding: 15px;
    margin-top: 20px;
}

.example-box ul {
    margin-left: 20px;
    color: var(--text-dark);
}

.example-box li {
    margin: 8px 0;
}

.example-box code {
    background: var(--light-blue);
    padding: 2px 6px;
    border-radius: 3px;
    font-family: monospace;
    font-size: 0.9em;
    color: var(--primary-blue);
}

/* Footer */
footer {
    text-align: center;
    margin-top: 40px;
    padding-top: 20px;
    border-top: 1px solid var(--border-color);
    color: var(--faded-text);
    font-size: 0.9rem;
}

/* Login Form Styles */
.login-container {
    max-width: 610px;
    margin: 50px auto;
    background: var(--panel-beige);
    border-radius: 8px;
    box-shadow: 0 5px 15px rgba(0, 40, 60, 0.15);
    border: 1px solid var(--border-color);
    overflow: hidden;
}

.login-container header {
    margin-bottom: 0;
    border-radius: 8px 8px 0 0;
}

.login-container .form-container {
    margin: 0 20px 20px 20px;
}

.login-container .error {
    margin: 20px;
}

.login-container p:first-of-type {
  padding: 0 20px;
  margin-top: 20px;
}

/* Responsive Design */
@media (max-width: 768px) {
    body {
        padding: 15px;
    }

    .btn-container {
        flex-direction: column;
    }

    button {
        width: 100%;
    }

    header {
        padding: 15px;
    }

    h1, h1.login {
        font-size: 1.8rem;
    }

    .header-content {
        flex-direction: column;
        gap: 15px;
        text-align: center;
    }

    .logout-link {
        display: inline-block;
    }
}

/* Responsive header with flag adjustments */
@media (max-width: 700px) {
    .header-title {
        font-size: 1.8rem;
    }
}

@media (max-width: 600px) {
    .header-title {
        font-size: 1.5rem;
    }
    .login-header .header-title {
        font-size: 1.5rem;
    }
}

@media (max-width: 500px) {
    .header-with-flag {
        gap: 10px;
    }
    .header-title {
        font-size: 1.3rem;
    }
    .logout-link {
        font-size: 0.9rem;
        padding: 5px 10px;
    }
}
