/* Модальное окно информации о реферальной системе */
.referral-modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: rgba(15, 23, 42, 0.75);
    display: none;
    justify-content: center;
    align-items: center;
    z-index: 1000;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.referral-modal-overlay.active {
    display: flex;
    opacity: 1;
}

.referral-modal {
    background-color: #ffffff;
    border-radius: 12px;
    width: 90%;
    max-width: 400px;
    max-height: 85vh;
    display: flex;
    flex-direction: column;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
    transform: scale(0.95);
    transition: transform 0.3s ease;
}

.referral-modal-overlay.active .referral-modal {
    transform: scale(1);
}

.referral-modal-header {
    padding: 16px 20px;
    border-bottom: 1px solid #e2e8f0;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-shrink: 0;
}

.referral-modal-header h2 {
    margin: 0;
    color: #0f172a;
    font-size: 18px;
    font-weight: 600;
}

.referral-modal-close {
    background: none;
    border: none;
    cursor: pointer;
    padding: 4px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: opacity 0.2s;
}

.referral-modal-close:hover {
    opacity: 0.7;
}

.referral-modal-close svg {
    width: 24px;
    height: 24px;
}

.referral-modal-body {
    flex: 1;
    overflow-y: auto;
    padding: 20px;
}

.referral-info-section {
    text-align: center;
    margin-bottom: 20px;
}

.referral-icon {
    width: 64px;
    height: 64px;
    margin: 0 auto 12px;
}

.referral-info-section h3 {
    margin: 0 0 8px 0;
    color: #0f172a;
    font-size: 16px;
    font-weight: 600;
}

.referral-description {
    color: #64748b;
    line-height: 1.5;
    margin: 0;
    font-size: 13px;
}

.referral-benefits {
    margin-bottom: 20px;
}

.referral-benefits h4 {
    margin: 0 0 12px 0;
    color: #0f172a;
    font-size: 14px;
    font-weight: 600;
}

.referral-benefit-item {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    margin-bottom: 10px;
    padding: 10px;
    background-color: #f8fafc;
    border-radius: 6px;
    border: 1px solid #e2e8f0;
}

.benefit-icon {
    width: 20px;
    height: 20px;
    flex-shrink: 0;
    margin-top: 1px;
}

.benefit-icon svg {
    width: 100%;
    height: 100%;
}

.benefit-text {
    color: #475569;
    line-height: 1.5;
    flex: 1;
    font-size: 13px;
}

.benefit-text strong {
    color: #0f172a;
    font-weight: 600;
}

.referral-example {
    background-color: #f1f5f9;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    padding: 16px;
    margin-bottom: 20px;
}

.referral-example h4 {
    margin: 0 0 8px 0;
    color: #0f172a;
    font-size: 14px;
    font-weight: 600;
}

.referral-example p {
    margin: 0 0 10px 0;
    color: #475569;
    font-size: 13px;
}

.referral-example ul {
    margin: 0;
    padding-left: 20px;
    color: #475569;
}

.referral-example li {
    margin-bottom: 6px;
    font-size: 13px;
    line-height: 1.5;
}

.referral-rules {
    margin-bottom: 12px;
}

.referral-rules h4 {
    margin: 0 0 10px 0;
    color: #0f172a;
    font-size: 14px;
    font-weight: 600;
}

.referral-rules ul {
    margin: 0;
    padding-left: 20px;
    color: #64748b;
}

.referral-rules li {
    margin-bottom: 6px;
    line-height: 1.5;
    font-size: 13px;
}

.referral-modal-footer {
    padding: 12px 20px;
    border-top: 1px solid #e2e8f0;
    display: flex;
    gap: 10px;
    flex-shrink: 0;
}

.referral-copy-btn {
    flex: 1;
    background-color: #64748b;
    border: none;
    border-radius: 6px;
    padding: 10px 16px;
    cursor: pointer;
    color: #ffffff;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    font-size: 13px;
    font-weight: 600;
}

.referral-copy-btn:hover {
    background-color: #475569;
}

.referral-copy-btn svg {
    width: 16px;
    height: 16px;
}

.referral-close-btn {
    background-color: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 6px;
    padding: 10px 20px;
    cursor: pointer;
    color: #64748b;
    transition: all 0.2s ease;
    font-size: 13px;
    font-weight: 600;
}

.referral-close-btn:hover {
    background-color: #f8fafc;
    border-color: #cbd5e1;
}

/* Custom Scrollbar */
.referral-modal-body::-webkit-scrollbar {
    width: 6px;
}

.referral-modal-body::-webkit-scrollbar-track {
    background: #f1f5f9;
    border-radius: 3px;
}

.referral-modal-body::-webkit-scrollbar-thumb {
    background: #cbd5e1;
    border-radius: 3px;
}

.referral-modal-body::-webkit-scrollbar-thumb:hover {
    background: #94a3b8;
}

/* Touch scroll improvements */
.referral-modal-body {
    -webkit-overflow-scrolling: touch;
    overscroll-behavior: contain;
}
