/**
 * auth-styles-modals.css - מודלים ואלמנטים מורכבים
 * פוצל מ: auth-styles.css
 * תאריך: 2026-01-20
 *
 * תוכן:
 * - Terms Checkbox
 * - Terms Modal (פופאפ תנאי שימוש)
 * - Google OAuth Button
 * - Link Dialog
 * - Toast Notifications Animations
 */


/* ==========================================
   Terms Checkbox - תיבת אישור תנאי שימוש
   ========================================== */
.auth-terms-container {
    margin-top: 20px;
    margin-bottom: 8px;
    padding: 16px;
    background: linear-gradient(135deg, #f8fafc, #f1f5f9);
    border-radius: 12px;
    border: 1px solid #e2e8f0;
}

.auth-terms-checkbox-label {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    cursor: pointer;
    font-size: 0.9rem;
    line-height: 1.5;
    color: #374151;
    user-select: none;
}

.auth-terms-checkbox {
    display: none;
}

.auth-terms-checkmark {
    width: 22px;
    height: 22px;
    min-width: 22px;
    border: 2px solid #cbd5e1;
    border-radius: 6px;
    background: white;
    position: relative;
    transition: all 0.2s ease;
    margin-top: 2px;
}

.auth-terms-checkbox:checked + .auth-terms-checkmark {
    background: linear-gradient(135deg, #2563eb, #1d4ed8);
    border-color: #2563eb;
}

.auth-terms-checkbox:checked + .auth-terms-checkmark::after {
    content: '';
    position: absolute;
    top: 3px;
    left: 7px;
    width: 5px;
    height: 10px;
    border: solid white;
    border-width: 0 2px 2px 0;
    transform: rotate(45deg);
}

.auth-terms-checkbox:focus + .auth-terms-checkmark {
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.2);
}

.auth-terms-text {
    flex: 1;
}

.auth-terms-link {
    background: none;
    border: none;
    padding: 0;
    margin: 0;
    color: #2563eb;
    font-weight: 600;
    cursor: pointer;
    text-decoration: underline;
    font-size: inherit;
    font-family: inherit;
    transition: color 0.2s;
}

.auth-terms-link:hover {
    color: #1d4ed8;
}

/* כפתור הרשמה מושבת */
.auth-btn-disabled,
.auth-btn-primary-modern:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    background: #9ca3af;
}

.auth-btn-primary-modern:disabled:hover {
    background: #9ca3af;
    transform: none;
    box-shadow: none;
}

/* ==========================================
   Terms Modal - פופאפ תנאי שימוש
   ========================================== */
.terms-modal {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(4px);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 10001;
    padding: 20px;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
}

.terms-modal-visible {
    opacity: 1;
    pointer-events: auto;
}

.terms-modal-content {
    background: #fff;
    border-radius: 16px;
    box-shadow: 0 25px 60px rgba(0, 0, 0, 0.3);
    width: 100%;
    max-width: 700px;
    max-height: 85vh;
    display: flex;
    flex-direction: column;
    transform: scale(0.95) translateY(20px);
    transition: transform 0.3s ease;
    overflow: hidden;
}

.terms-modal-visible .terms-modal-content {
    transform: scale(1) translateY(0);
}

/* Header */
.terms-modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 24px 28px;
    background: linear-gradient(135deg, #2563eb, #1d4ed8);
    color: white;
}

.terms-modal-title {
    font-size: 1.4rem;
    font-weight: 700;
    margin: 0;
    letter-spacing: -0.01em;
}

.terms-close-btn {
    width: 40px;
    height: 40px;
    border-radius: 10px;
    border: none;
    background: rgba(255, 255, 255, 0.2);
    color: white;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
}

.terms-close-btn:hover {
    background: rgba(255, 255, 255, 0.3);
    transform: scale(1.05);
}

/* Body */
.terms-modal-body {
    flex: 1;
    overflow-y: auto;
    padding: 0;
}

.terms-content {
    padding: 28px;
}

.terms-last-update {
    color: #6b7280;
    font-size: 0.85rem;
    margin-bottom: 24px;
    padding-bottom: 16px;
    border-bottom: 1px solid #e5e7eb;
}

.terms-section {
    margin-bottom: 28px;
}

.terms-section h3 {
    font-size: 1.1rem;
    font-weight: 700;
    color: #1f2937;
    margin: 0 0 12px 0;
    padding-bottom: 8px;
    border-bottom: 2px solid #e5e7eb;
}

.terms-section p {
    font-size: 0.9rem;
    line-height: 1.75;
    color: #4b5563;
    margin: 0 0 12px 0;
    text-align: justify;
}

.terms-section p:last-child {
    margin-bottom: 0;
}

.terms-section strong {
    color: #1f2937;
}

.terms-section ul {
    margin: 12px 0;
    padding-right: 24px;
}

.terms-section li {
    font-size: 0.9rem;
    line-height: 1.75;
    color: #4b5563;
    margin-bottom: 8px;
}

.terms-agreement {
    background: linear-gradient(135deg, #fef3c7, #fde68a);
    border: 1px solid #f59e0b;
    border-radius: 12px;
    padding: 20px !important;
    margin-top: 32px;
}

.terms-agreement h3 {
    color: #92400e !important;
    border-bottom-color: #f59e0b !important;
}

.terms-agreement p,
.terms-agreement li {
    color: #78350f !important;
}

/* Footer */
.terms-modal-footer {
    display: flex;
    gap: 12px;
    padding: 20px 28px;
    background: #f9fafb;
    border-top: 1px solid #e5e7eb;
}

.terms-accept-btn {
    flex: 2;
    padding: 14px 24px;
    background: linear-gradient(135deg, #10b981, #059669);
    color: white;
    border: none;
    border-radius: 10px;
    font-size: 1rem;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.2s ease;
    font-family: 'Segoe UI', Tahoma, Arial, sans-serif;
}

.terms-accept-btn:hover {
    background: linear-gradient(135deg, #059669, #047857);
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(16, 185, 129, 0.4);
}

.terms-decline-btn {
    flex: 1;
    padding: 14px 24px;
    background: transparent;
    color: #6b7280;
    border: 2px solid #e5e7eb;
    border-radius: 10px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    font-family: 'Segoe UI', Tahoma, Arial, sans-serif;
}

.terms-decline-btn:hover {
    border-color: #9ca3af;
    color: #374151;
}

/* Scrollbar for terms body */
.terms-modal-body::-webkit-scrollbar {
    width: 8px;
}

.terms-modal-body::-webkit-scrollbar-track {
    background: #f1f1f1;
}

.terms-modal-body::-webkit-scrollbar-thumb {
    background: linear-gradient(135deg, #2563eb, #1d4ed8);
    border-radius: 4px;
}

.terms-modal-body::-webkit-scrollbar-thumb:hover {
    background: #1d4ed8;
}

/* Responsive - Terms Modal */
@media (max-width: 768px) {
    .terms-modal {
        padding: 10px;
    }

    .terms-modal-content {
        max-height: 95vh;
        border-radius: 12px;
    }

    .terms-modal-header {
        padding: 18px 20px;
    }

    .terms-modal-title {
        font-size: 1.2rem;
    }

    .terms-content {
        padding: 20px;
    }

    .terms-section h3 {
        font-size: 1rem;
    }

    .terms-section p,
    .terms-section li {
        font-size: 0.85rem;
    }

    .terms-modal-footer {
        flex-direction: column;
        padding: 16px 20px;
    }

    .terms-accept-btn,
    .terms-decline-btn {
        flex: none;
        width: 100%;
    }
}

/* Reduced Motion - Terms */
@media (prefers-reduced-motion: reduce) {
    .terms-modal,
    .terms-modal-content,
    .auth-terms-checkmark {
        transition: none !important;
    }
}

/* ==========================================
   Google OAuth Button Styles
   ========================================== */

.auth-google-container {
    margin-bottom: 20px;
}

.auth-google-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    width: 100%;
    padding: 14px 24px;
    background: #ffffff;
    border: 2px solid #e0e0e0;
    border-radius: var(--auth-radius-sm);
    color: #3c4043;
    font-size: 15px;
    font-weight: 500;
    font-family: inherit;
    cursor: pointer;
    transition: var(--auth-transition);
    direction: ltr;
}

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

.auth-google-btn:active {
    transform: scale(0.98);
}

.auth-google-btn svg {
    flex-shrink: 0;
}

.auth-google-btn span {
    direction: rtl;
}

/* קו הפרדה עם "או" */
.auth-divider-line {
    display: flex;
    align-items: center;
    margin: 20px 0;
    gap: 15px;
}

.auth-divider-line::before,
.auth-divider-line::after {
    content: '';
    flex: 1;
    height: 1px;
    background: linear-gradient(to right, transparent, #e0e0e0, transparent);
}

.auth-divider-line span {
    color: #9e9e9e;
    font-size: 13px;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 1px;
}

/* דיאלוג קישור חשבונות */
.auth-link-dialog {
    text-align: center;
    padding: 10px 0;
}

.auth-link-dialog h4 {
    color: #e67e22;
    margin-bottom: 10px;
}

.auth-link-dialog p {
    margin: 5px 0;
    color: #666;
}

/* הודעת info */
.auth-message.auth-info {
    background: linear-gradient(135deg, rgba(52, 152, 219, 0.1), rgba(52, 152, 219, 0.2));
    border: 1px solid rgba(52, 152, 219, 0.3);
    color: #2980b9;
}

.auth-message.auth-warning {
    background: linear-gradient(135deg, rgba(230, 126, 34, 0.1), rgba(230, 126, 34, 0.2));
    border: 1px solid rgba(230, 126, 34, 0.3);
    color: #d35400;
}

/* ==========================================
   Toast Notifications Animations
   אנימציות להודעות קופצות
   ========================================== */
@keyframes slideIn {
    from {
        transform: translateX(100%);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

@keyframes slideOut {
    from {
        transform: translateX(0);
        opacity: 1;
    }
    to {
        transform: translateX(100%);
        opacity: 0;
    }
}

/* Reduce motion for accessibility */
@media (prefers-reduced-motion: reduce) {
    @keyframes slideIn {
        from { opacity: 0; }
        to { opacity: 1; }
    }

    @keyframes slideOut {
        from { opacity: 1; }
        to { opacity: 0; }
    }

    .toast {
        animation-duration: 0.1s !important;
    }
}

