/* ===========================================
   MODAL STYLES
   Modal Overlays, Content, Forms, Authentication
   =========================================== */

/* Modal overlay and content */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.65);
    display: none;
    justify-content: center;
    align-items: center;
    z-index: 1000;
}

.modal-overlay.active {
    display: flex;
}

.modal-content {
    background: var(--panel);
    border: 1px solid var(--border);
    border-radius: 10px;
    padding: 30px;
    max-width: 500px;
    width: 90%;
    max-height: 80vh;
    overflow-y: auto;
    position: relative;
}

/* Privacy modal wider */
#privacyModal .modal-content {
    max-width: 620px;
}

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

.modal-title {
    margin: 0;
    font-size: 16px;
    font-weight: 600;
    color: var(--text);
    text-align: left;
}

.modal-close {
    background: transparent;
    border: none;
    font-size: 26px !important;
    cursor: pointer;
    color: #000000;
    margin: -5px;
    margin-left: auto;
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.modal-close:hover {
    color: #e6623c;
}

.modal-body {
    color: var(--text);
    line-height: 1.7;
}

/* Authentication Forms */
.auth-form {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.form-group {
    display: flex;
    flex-direction: column;
}

.form-group label {
    margin-bottom: 8px;
    font-weight: 500;
    color: var(--text);
}

.form-group input {
    padding: 12px;
    border: 1px solid var(--border);
    border-radius: 5px;
    font-size: 14px;
    background: var(--panel);
    color: var(--text);
    transition: border-color 0.2s ease;
}

.form-group input:focus {
    outline: none;
    border-color: var(--accent);
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.1);
}

.auth-btn {
    padding: 12px 20px;
    border: none;
    border-radius: 5px;
    font-size: 14px;
    font-weight: 400;
    cursor: pointer;
    transition: all 0.2s ease;
    text-decoration: none;
    display: inline-block;
    text-align: center;
}

.auth-btn.primary {
    background: #000000 !important;
    color: white;
    height: 60px;
    width: 80%;
    line-height: 60px;
    padding: 0 16px;
    box-shadow: 0 1px 0 rgba(0, 0, 0, 0.04);
    margin: 30px auto 0 auto;
}

.auth-btn.primary:hover {
    background: #e65029 !important;
}

.auth-btn.secondary {
    background: var(--panel);
    color: var(--text);
    border: 1px solid var(--border);
}

.auth-btn.secondary:hover {
    background: var(--border);
}

.auth-btn.google-btn {
    background: #ffffff;
    color: #000000;
    border: 1px solid #dadce0;
    display: flex;
    align-items: center;
    width: 100%;
    justify-content: center;
    gap: 10px;
    box-shadow: 0 1px 0 rgba(0, 0, 0, 0.04);
    height: 60px;
    margin: 30px 0px;
    line-height: 60px;
    border-radius: 5px;
    padding: 0 16px;
    font-weight: 400;
}

.auth-btn.google-btn:hover {
    background: #f8f9fa;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.google-icon {
    width: 18px;
    height: 18px;
}

.auth-divider {
    text-align: center;
    margin: 20px 0;
    position: relative;
    color: var(--muted);
}

.auth-divider::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 0;
    right: 0;
    height: 1px;
    background: var(--border);
    z-index: 1;
}

.auth-divider span {
    background: var(--panel);
    padding: 0 15px;
    position: relative;
    z-index: 2;
}

.auth-links {
    text-align: center;
    margin-top: 20px;
}

.auth-links a {
    color: #000000;
    text-decoration: none;
}

.auth-links a:hover {
    color: #e6623c;
    text-decoration: underline;
}

/* Social Login */
.social-login {
    margin-bottom: 20px;
}

/* Subscription Plans */
.subscription-plans {
    text-align: center;
}

.plan-card {
    border: none;
    border-radius: 10px;
    margin-bottom: 20px;
}

h1 {
    margin: 0 0 20px 0;
    font-size: 24px;
    color: var(--text);
    letter-spacing: -0.2px;
}

.price {
    display: flex;
    align-items: baseline;
    justify-content: center;
    gap: 8px;
}

.price .currency {
    font-size: 16px;
    color: var(--text-muted);
}

.price .amount {
    font-size: 32px;
    font-weight: 700;
    color: var(--text);
}

.price .period {
    font-size: 16px;
    color: var(--text-muted);
}

.billing-note {
    color: var(--muted);
    font-size: 14px;
    margin: -5px 0 40px 0;
}

.plan-features ul {
    list-style: none;
    padding: 0;
    margin: 20px 0;
    text-align: center;
    font-size: 16px;
}

.plan-features li {
    padding: 8px 0;
    color: var(--text);
    position: relative;
    text-align: center;
    display: inline-block;
    width: 100%;
}

.plan-features li::before {
    content: '✓ ';
    color: #22c55e;
    font-weight: bold;
    font-size: 16px;
    margin-right: 4px;
}

.payment-security {
    margin-top: 15px;
    font-size: 12px;
    color: var(--muted);
}

.subscription-status {
    padding: 10px 15px;
    border-radius: 5px;
    font-size: 12px;
    text-align: center;
}

.subscription-status.active {
    background: #e6f7ff;
    color: #0056b3;
    border: 1px solid #b3d7ff;
}

/* Forgot Password Success Message */
.reset-success {
    text-align: center;
    padding: 2rem 0;
}

.reset-success h3 {
    margin: 0 0 1rem 0;
    font-size: 16px;
    color: var(--text);
}

.reset-success p {
    margin: 0 0 2rem 0;
    font-size: 14px;
    line-height: 1.7;
    color: var(--text);
}

/* Newsletter Form */
.newsletter-form {
    margin: 2rem 0;
    text-align: center;
}

.newsletter-form .form-group {
    margin-bottom: 1rem;
}

.newsletter-form input {
    width: 100%;
    padding: 12px;
    border: 1px solid var(--border);
    border-radius: 5px;
    font-size: 14px;
}

.newsletter-form input:focus {
    outline: none;
    border-color: #e6623c;
    box-shadow: 0 0 0 3px rgba(230, 98, 60, 0.1);
}

.newsletter-btn {
    width: 100%;
    margin-top: 1rem;
}

.newsletter-success {
    text-align: center;
    padding: 2rem 0;
}

.newsletter-success h3 {
    margin: 0 0 1rem 0;
    font-size: 16px;
    color: #e6623c;
}

.newsletter-success p {
    margin: 0;
    font-size: 14px;
    line-height: 1.7;
    color: var(--text);
    text-align: center;
}

/* Info Modals (Privacy, Contact, Newsletter) */
.info-modal-content {
    text-align: center;
    max-width: 520px;
    margin: 0 auto;
}

.info-modal-content h2 {
    margin: 0 0 1.5rem 0;
    font-size: 21px;
    color: #e6623c;
    letter-spacing: 0;
}

.info-modal-content h1 {
    text-align: left;
}

.info-modal-content h3 {
    margin: 2rem 0 1rem 0;
    text-align: left;
}

.info-modal-content p {
    margin: 0 0 1rem 0;
    font-size: 14px;
    line-height: 1.7;
    color: var(--text);
    text-align: left;
}

.info-modal-content p:last-child {
    margin-bottom: 0;
}

.info-modal-content ul {
    text-align: left;
    margin: 0 0 1rem 0;
    padding-left: 20px;
}

.info-modal-content li {
    margin: 0 0 0.5rem 0;
    line-height: 1.7;
    color: var(--text);
}

/* Contact modal center aligned */
#contactModal .info-modal-content {
    text-align: center;
}

#contactModal .info-modal-content h1 {
    text-align: center;
}

#contactModal .info-modal-content p {
    text-align: center;
}

#contactModal .info-modal-content h3 {
    text-align: center;
}