/* ==========================================================================
   ReCoop — Be a Member modal
   ========================================================================== */

:root {
    --recoop-green: #1e5b3a;
    --recoop-green-dark: #16452c;
    --recoop-green-light: #eaf5ee;
    --recoop-border: #e2e5e3;
    --recoop-text: #1f2823;
    --recoop-muted: #7c8a82;
    --recoop-error: #d64545;
    --recoop-radius: 10px;
}

.recoop-membership-trigger {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: var(--recoop-green);
    color: #fff;
    border: none;
    border-radius: 999px;
    padding: 12px 28px;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.15s ease, transform 0.1s ease;
}

.recoop-membership-trigger:hover {
    background: var(--recoop-green-dark);
}

.recoop-membership-trigger:active {
    transform: scale(0.98);
}

/* ---- Overlay & modal shell ---- */

.recoop-modal-overlay {
    position: fixed;
    inset: 0;
    z-index: 9999;
    background: rgba(20, 30, 24, 0.55);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 24px;
}

.recoop-modal {
    background: #fff;
    width: 100%;
    max-width: 900px;
    max-height: 90vh;
    border-radius: 14px;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.25);
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
}

.recoop-modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 20px 28px;
    border-bottom: 1px solid var(--recoop-border);
    flex-shrink: 0;
}

.recoop-modal-header h2 {
    margin: 0;
    font-size: 20px;
    font-weight: 700;
    color: var(--recoop-text);
}

.recoop-modal-close {
    background: none;
    border: none;
    font-size: 22px;
    line-height: 1;
    color: var(--recoop-muted);
    cursor: pointer;
    padding: 4px;
}

.recoop-modal-close:hover {
    color: var(--recoop-text);
}

.recoop-modal-body {
    padding: 20px 28px 28px;
    overflow-y: auto;
}

/* ---- Notice / success banners ---- */

.recoop-modal-notice {
    background: var(--recoop-green-light);
    color: var(--recoop-green-dark);
    border-radius: 8px;
    padding: 12px 16px;
    font-size: 14px;
    display: flex;
    align-items: flex-start;
    gap: 8px;
    margin-bottom: 20px;
}

.recoop-notice-icon {
    flex-shrink: 0;
}

.recoop-modal-success {
    background: var(--recoop-green-light);
    color: var(--recoop-green-dark);
    border-radius: 8px;
    padding: 24px;
    text-align: center;
    margin-bottom: 20px;
}

.recoop-success-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: var(--recoop-green);
    color: #fff;
    font-size: 18px;
    margin-bottom: 10px;
}

.recoop-success-text {
    margin: 0;
    font-weight: 600;
}

.recoop-form-error-summary {
    background: #fdecec;
    color: var(--recoop-error);
    border-radius: 8px;
    padding: 10px 16px;
    font-size: 13px;
    margin-bottom: 16px;
}

/* ---- Fieldsets / sections ---- */

.recoop-fieldset {
    border: none;
    padding: 0;
    margin: 0 0 24px;
}

.recoop-fieldset legend {
    font-size: 15px;
    font-weight: 700;
    color: var(--recoop-green);
    padding: 0 0 14px;
    width: 100%;
    border-bottom: 1px solid var(--recoop-border);
    margin-bottom: 16px;
}

.recoop-grid-3 {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 16px;
    margin-bottom: 16px;
}

@media (max-width: 720px) {
    .recoop-grid-3 {
        grid-template-columns: 1fr;
    }
}

.recoop-field {
    display: flex;
    flex-direction: column;
    position: relative;
}

.recoop-field label {
    font-size: 13px;
    font-weight: 600;
    color: var(--recoop-text);
    margin-bottom: 6px;
}

.recoop-field .req {
    color: var(--recoop-error);
}

.recoop-field input[type="text"],
.recoop-field input[type="email"],
.recoop-field input[type="password"],
.recoop-field input[type="number"],
.recoop-field input[type="date"],
.recoop-field select,
.recoop-field textarea {
    border: 1px solid var(--recoop-border);
    border-radius: 8px;
    padding: 10px 12px;
    font-size: 14px;
    color: var(--recoop-text);
    background: #fff;
    width: 100%;
    box-sizing: border-box;
    font-family: inherit;
}

.recoop-field input:focus,
.recoop-field select:focus,
.recoop-field textarea:focus {
    outline: none;
    border-color: var(--recoop-green);
    box-shadow: 0 0 0 3px rgba(30, 91, 58, 0.12);
}

.recoop-field textarea {
    min-height: 90px;
    resize: vertical;
}

.recoop-field.has-error input,
.recoop-field.has-error select,
.recoop-field.has-error textarea {
    border-color: var(--recoop-error);
}

.recoop-field-error {
    color: var(--recoop-error);
    font-size: 12px;
    margin-top: 5px;
    min-height: 14px;
}

.recoop-field-hint {
    font-size: 11.5px;
    color: var(--recoop-muted);
    margin: 6px 0 0;
    display: flex;
    align-items: flex-start;
    gap: 4px;
}

.recoop-char-count {
    align-self: flex-end;
    font-size: 12px;
    color: var(--recoop-muted);
    margin-top: 4px;
}

/* ---- Investment prefix ---- */

.recoop-input-prefix {
    display: flex;
    align-items: center;
    border: 1px solid var(--recoop-border);
    border-radius: 8px;
    overflow: hidden;
}

.recoop-input-prefix span {
    padding: 10px 10px 10px 12px;
    color: var(--recoop-muted);
    font-weight: 600;
    background: #fafafa;
    border-right: 1px solid var(--recoop-border);
}

.recoop-input-prefix input {
    border: none !important;
    box-shadow: none !important;
    flex: 1;
}

/* ---- Locked status field ---- */

.recoop-locked-field {
    position: relative;
    display: flex;
    align-items: center;
}

.recoop-locked-field input {
    background: #f2f3f2;
    color: var(--recoop-muted);
    cursor: not-allowed;
    padding-right: 34px;
}

.recoop-lock-icon {
    position: absolute;
    right: 12px;
    color: var(--recoop-muted);
    font-size: 14px;
}

/* ---- Password eye toggle ---- */

.password-group {
    position: relative;
}

.recoop-eye-toggle {
    position: absolute;
    right: 12px;
    top: 34px;
    cursor: pointer;
    display: flex;
}

.recoop-eye-toggle svg {
    width: 20px;
    height: 20px;
}

.recoop-eye-toggle #rcEyeClosed {
    display: none;
}

.recoop-eye-toggle.active #rcEyeOpen {
    display: none;
}

.recoop-eye-toggle.active #rcEyeClosed {
    display: block;
}

/* ---- Footer / actions ---- */

.recoop-modal-footer {
    display: flex;
    justify-content: flex-end;
    gap: 12px;
    padding-top: 8px;
    border-top: 1px solid var(--recoop-border);
    margin-top: 8px;
}

.recoop-btn-cancel,
.recoop-btn-submit {
    border-radius: 8px;
    padding: 11px 22px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    border: 1px solid transparent;
}

.recoop-btn-cancel {
    background: #fff;
    color: var(--recoop-text);
    border-color: var(--recoop-border);
}

.recoop-btn-cancel:hover {
    background: #f7f7f7;
}

.recoop-btn-submit {
    background: var(--recoop-green);
    color: #fff;
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.recoop-btn-submit:hover {
    background: var(--recoop-green-dark);
}

.recoop-btn-submit:disabled {
    opacity: 0.7;
    cursor: not-allowed;
}