/* United We Rise - Modal System Styles */

/* ========================================
   MODAL BASE STYLES
======================================== */

.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.5);
    z-index: 10000;
}

.modal-content {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: white;
    padding: 1.5rem;
    border-radius: 8px;
    width: 90%;
    max-width: 400px;
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.8rem;
}

.modal-body {
    margin-bottom: 1rem;
}

/* ========================================
   FORM STYLES
======================================== */

#registerForm .form-group {
    margin-bottom: 0.5rem !important;
}

.form-group {
    margin-bottom: 0.8rem;
}

#registerForm .form-group label {
    display: block;
    margin-bottom: 0.2rem !important;
    font-weight: bold;
}

.form-group label {
    display: block;
    margin-bottom: 0.3rem;
    font-weight: bold;
}

#registerForm .form-group input {
    width: 100%;
    padding: 0.4rem !important;
    border: 1px solid #ccc;
    border-radius: 4px;
    box-sizing: border-box;
}

.form-group input {
    width: 100%;
    padding: 0.5rem;
    border: 1px solid #ccc;
    border-radius: 4px;
    box-sizing: border-box;
}

.auth-switch {
    text-align: center;
    margin-top: 1rem;
}

.auth-switch a {
    color: #4b5c09;
    cursor: pointer;
    text-decoration: underline;
}

.error-message {
    color: #d32f2f;
    margin-top: 0.5rem;
    font-size: 0.9rem;
}

.success-message {
    color: #2e7d32;
    margin-top: 0.5rem;
    font-size: 0.9rem;
}

/* ========================================
   PASSWORD INPUT STYLING
======================================== */

.password-input-container {
    position: relative;
    display: flex;
    align-items: center;
}

.password-toggle {
    position: absolute;
    right: 8px;
    background: none;
    border: none;
    cursor: pointer;
    font-size: 1.2rem;
    z-index: 1;
    opacity: 0.6;
    transition: opacity 0.2s;
}

.password-toggle:hover {
    opacity: 1;
}

.password-status {
    position: absolute;
    right: 40px;
    font-size: 1.2rem;
    color: #28a745;
    display: none;
    pointer-events: none;
}

.password-requirements {
    margin-top: 0.5rem;
    font-size: 0.85rem;
}

.requirement {
    margin: 0.2rem 0;
    transition: color 0.2s;
    color: #dc3545; /* Red by default */
}

.requirement.met {
    color: #28a745; /* Green when met */
}

.requirement.met::before {
    content: '✓ ';
    font-weight: bold;
}

/* hCaptcha styling */
.h-captcha {
    margin: 1rem 0;
}

/* ========================================
   CHECKBOX STYLES
======================================== */

.checkbox-container {
    display: flex;
    align-items: flex-start;
    cursor: pointer;
    font-size: 0.9rem;
    line-height: 1.4;
    padding-left: 0;
}

.checkbox-container input[type="checkbox"] {
    position: absolute;
    opacity: 0;
    width: 0;
    height: 0;
}

.checkmark {
    height: 18px;
    width: 18px;
    background-color: #fff;
    border: 2px solid #ddd;
    border-radius: 3px;
    margin-right: 10px;
    margin-top: 2px;
    flex-shrink: 0;
    position: relative;
    transition: all 0.2s ease;
    display: inline-block;
    box-sizing: border-box;
}

.checkbox-container:hover .checkmark {
    border-color: #4b5c09;
}

.checkbox-container input:checked ~ .checkmark {
    background-color: #4b5c09;
    border-color: #4b5c09;
}

.checkmark:after {
    content: "";
    position: absolute;
    display: none;
    left: 5px;
    top: 2px;
    width: 4px;
    height: 8px;
    border: solid white;
    border-width: 0 2px 2px 0;
    transform: rotate(45deg);
}

.checkbox-container input:checked ~ .checkmark:after {
    display: block;
}

.checkbox-container a {
    color: #4b5c09;
    text-decoration: underline;
}

.checkbox-container a:hover {
    color: #2e3805;
}

/* ========================================
   COMMENTS MODAL
======================================== */

.comments-modal {
    backdrop-filter: blur(4px);
}

.comments-modal-content {
    box-shadow: 0 20px 60px rgba(0,0,0,0.2);
}

.comment-item:hover {
    background-color: #f9f9f9;
}

/* ========================================
   CTA PANELS
======================================== */

#google-cta-panel {
    position: absolute;
    top: 20%;
    left: 50%;
    transform: translateX(-50%);
    background: #F8F4E9;
    border: 2px solid #6B8E23;
    border-radius: 12px;
    box-shadow: 0 4px 6px rgba(0,0,0,0.1);
    padding: 16px 24px;
    width: auto;
    max-width: 90vw;
    box-sizing: border-box;
    display: none;
    z-index: 9999;
}

#google-cta-panel button {
    position: absolute;
    top: 8px;
    right: 8px;
    background: none;
    border: none;
    font-size: 1.2rem;
    color: #5A534A;
    cursor: pointer;
}