/**
 * Calandus User Forms CSS
 * Registration, login, and profile forms
 */

/* Form containers */
.calandus-signup-form,
.calandus-login-form {
    max-width: 480px;
    margin: 0 auto;
    padding: 40px;
    background: #ffffff;
    border-radius: 16px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
}

.calandus-signup-form h2,
.calandus-login-form h2 {
    margin: 0 0 8px 0;
    font-size: 28px;
    font-weight: 700;
    color: #1e293b;
    text-align: center;
}

.calandus-form-subtitle {
    text-align: center;
    color: #64748b;
    margin-bottom: 32px;
}

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

.calandus-form-group label {
    display: block;
    margin-bottom: 6px;
    font-weight: 500;
    color: #334155;
    font-size: 14px;
}

.calandus-form-group label .required {
    color: #ef4444;
}

.calandus-form-group input,
.calandus-form-group select,
.calandus-form-group textarea {
    width: 100%;
    padding: 12px 16px;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    font-size: 16px;
    color: #1e293b;
    background: #ffffff;
    transition: border-color 0.2s, box-shadow 0.2s;
}

.calandus-form-group input:focus,
.calandus-form-group select:focus,
.calandus-form-group textarea:focus {
    outline: none;
    border-color: #2563eb;
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}

.calandus-form-group input::placeholder {
    color: #94a3b8;
}

.calandus-form-group small {
    display: block;
    margin-top: 6px;
    font-size: 12px;
    color: #64748b;
}

/* Two-column row */
.calandus-form-row-2col {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
}

@media (max-width: 480px) {
    .calandus-form-row-2col {
        grid-template-columns: 1fr;
    }
}

/* Checkbox */
.calandus-form-checkbox label {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    cursor: pointer;
    font-weight: 400;
}

.calandus-form-checkbox input[type="checkbox"] {
    width: auto;
    margin-top: 3px;
}

.calandus-form-checkbox a {
    color: #2563eb;
    text-decoration: none;
}

.calandus-form-checkbox a:hover {
    text-decoration: underline;
}

/* Buttons */
.calandus-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 14px 24px;
    border: none;
    border-radius: 10px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
    text-decoration: none;
}

.calandus-btn-primary {
    background: linear-gradient(135deg, #2563eb 0%, #1d4ed8 100%);
    color: #ffffff;
    box-shadow: 0 4px 14px rgba(37, 99, 235, 0.35);
}

.calandus-btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(37, 99, 235, 0.45);
}

.calandus-btn-secondary {
    background: #f1f5f9;
    color: #334155;
}

.calandus-btn-secondary:hover {
    background: #e2e8f0;
}

.calandus-btn-danger {
    background: #fee2e2;
    color: #dc2626;
}

.calandus-btn-danger:hover {
    background: #fecaca;
}

.calandus-btn-small {
    padding: 8px 16px;
    font-size: 14px;
}

.calandus-btn-icon {
    width: 36px;
    height: 36px;
    padding: 0;
    background: #f1f5f9;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    transition: background 0.2s;
}

.calandus-btn-icon:hover {
    background: #e2e8f0;
}

/* Full width button in forms */
.calandus-signup-form .calandus-btn,
.calandus-login-form .calandus-btn {
    width: 100%;
    margin-top: 8px;
}

/* Google button */
.calandus-btn-google {
    background: #ffffff;
    color: #1f2937;
    border: 1px solid #e2e8f0;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08);
}

.calandus-btn-google:hover {
    background: #f9fafb;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.calandus-btn-google svg {
    width: 20px;
    height: 20px;
}

/* Form message */
.calandus-form-message {
    padding: 12px 16px;
    border-radius: 8px;
    margin-bottom: 16px;
    font-size: 14px;
}

.calandus-form-message.error {
    background: #fee2e2;
    color: #dc2626;
    border: 1px solid #fecaca;
}

.calandus-form-message.success {
    background: #dcfce7;
    color: #16a34a;
    border: 1px solid #bbf7d0;
}

/* Form footer */
.calandus-form-footer {
    text-align: center;
    margin-top: 24px;
    color: #64748b;
    font-size: 14px;
}

.calandus-form-footer a {
    color: #2563eb;
    text-decoration: none;
    font-weight: 500;
}

.calandus-form-footer a:hover {
    text-decoration: underline;
}

/* Loading state */
.calandus-btn .btn-loading {
    display: none;
}

.calandus-btn.loading .btn-text {
    display: none;
}

.calandus-btn.loading .btn-loading {
    display: inline;
}

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

/* Box sizing for all form elements */
.calandus-signup-form *,
.calandus-login-form * {
    box-sizing: border-box;
}

/* Mobile responsive */
@media (max-width: 480px) {
    .calandus-signup-form,
    .calandus-login-form {
        padding: 24px 16px;
        margin: 0 8px;
        border-radius: 12px;
    }

    .calandus-signup-form h2,
    .calandus-login-form h2 {
        font-size: 22px;
    }

    .calandus-form-subtitle {
        font-size: 14px;
        margin-bottom: 24px;
    }

    .calandus-form-group {
        margin-bottom: 16px;
    }

    .calandus-btn {
        min-height: 48px;
    }

    .calandus-form-footer {
        margin-top: 20px;
    }
}

/* Menu visibility based on login state */
body.logged-in .logged-out-only { display: none !important; }
body:not(.logged-in) .logged-in-only { display: none !important; }
