/* === ملف التنسيقات الموحد لإضافة الإحالة === */

.lp-profile-referral-code {
    font-family: 'Cairo', sans-serif;
    direction: rtl;
    text-align: right;
    padding: 25px;
    background: #fff;
    border-radius: 12px;
    border: 1px solid #ddd;
    margin: 20px 0;
}

.lp-profile-referral-code h6.text-muted {
    color: #666;
    font-size: 16px;
    margin-bottom: 5px;
}

.lp-profile-referral-code p {
    font-size: 15px;
    color: #333;
    margin-bottom: 15px;
}

.lp-profile-referral-code .alert-custom {
    background-color: #f8f9fa;
    border-right: 4px solid #2774e8;
    color: #2f4368;
    padding: 15px;
    border-radius: 5px;
    font-size: 15px;
    margin-top: 20px;
    text-align: right;
}

.lp-profile-referral-code .alert-custom a {
    color: #2774e8;
    font-weight: 600;
    text-decoration: none;
    transition: all 0.3s ease;
}

.lp-profile-referral-code .alert-custom a:hover {
    text-decoration: underline;
    color: #1a5cb0;
}

/* === صندوق الإحالة === */
.referral-container {
    font-family: 'Cairo', sans-serif;
    direction: rtl;
    background: #f8fafc;
    border-radius: 12px;
    padding: 20px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.05);
}

.referral-tabs-nav {
    display: flex;
    justify-content: center;
    margin-bottom: 20px;
    gap: 10px;
}

.referral-tabs-nav button {
    background: #e2e8f0;
    border: none;
    padding: 10px 20px;
    border-radius: 20px;
    font-weight: bold;
    font-size: 15px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.referral-tabs-nav button.active {
    background: #2563eb;
    color: #fff;
    box-shadow: 0 2px 8px rgba(0,0,0,0.15);
}

.referral-tab-content {
    display: none;
    background: #ffffff;
    padding: 20px;
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.04);
    animation: fadeIn 0.6s ease;
}

.referral-tab-content.active {
    display: block;
}

.referral-code-box {
    position: relative;
    display: flex;
    align-items: center;
}

#referral-code-input {
    padding-left: 45px !important;
}

.copy-button {
    position: absolute;
    left: 0;
    top: 50%;
    transform: translateY(-50%);
    background: transparent !important;
    border: none !important;
    cursor: pointer;
    font-size: 22px;
    color: #a0aec0;
    padding: 10px;
    transition: color 0.3s ease;
    height: 100%;
}

.copy-button:hover {
    background: transparent !important;
    color: var(--rr-primary-color, #2563eb) !important;
}

.referral-input-wrapper button {
    padding: 10px 12px;
    background-color: #2563eb;
    color: #fff;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-size: 14px;
    transition: background 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.referral-input-wrapper button:hover {
    background-color: #1e40af;
}

.referral-box {
    font-size: 15px;
    color: #333;
    margin-bottom: 15px;
    margin-top: 15px;
}

.alert-custom {
    background: #f1f5f9;
    padding: 15px;
    border-radius: 10px;
    font-size: 15px;
    margin-top: 20px;
    border-right: 5px solid #2563eb;
}

.alert-custom a {
    font-weight: bold;
    color: #2563eb;
    text-decoration: none;
}

.alert-custom a:hover {
    text-decoration: underline;
}

@keyframes fadeIn {
    from {opacity: 0; transform: translateY(10px);}
    to {opacity: 1; transform: translateY(0);}
}

/* إدارة الإضافة */
.referral-admin-wrapper {
    font-family: 'Cairo', sans-serif;
    background: #fff;
    padding: 25px;
    border-radius: 10px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
    max-width: 1000px;
    margin-top: 20px;
}

.referral-admin-wrapper h1,
.referral-admin-wrapper h2 {
    border-bottom: 1px solid #eee;
    padding-bottom: 5px;
    margin-top: 30px;
}

.referral-admin-wrapper table.form-table th {
    width: 250px;
    text-align: right;
}

.referral-admin-wrapper .form-table input[type="text"],
.referral-admin-wrapper .form-table input[type="number"] {
    width: 200px;
}

.referral-admin-wrapper .button {
    margin: 5px;
}

.referral-admin-wrapper table.wp-list-table {
    margin-top: 20px;
}

.nav-tab-wrapper {
    margin-bottom: 20px;
}

.nav-tab {
    margin-right: 5px;
}

.tab-content {
    display: none;
}

.tab-content.active {
    display: block;
}

/* === WooCommerce Profile Referral Code === */
.wc-profile-referral-code {
    font-family: 'Cairo', sans-serif;
    direction: rtl;
    text-align: right;
    padding: 25px;
    background: #fff;
    border-radius: 12px;
    border: 1px solid #ddd;
    margin: 20px 0;
}

.wc-profile-referral-code h6.text-muted {
    color: #666;
    font-size: 16px;
    margin-bottom: 5px;
    margin-top: 20px;
}

.wc-profile-referral-code h6.text-muted:first-child {
    margin-top: 0;
}

.wc-profile-referral-code p {
    font-size: 15px;
    color: #333;
    margin-bottom: 15px;
}

.wc-profile-referral-code .alert-custom {
    background-color: #f8f9fa;
    border-right: 4px solid #2774e8;
    color: #2f4368;
    padding: 15px;
    border-radius: 5px;
    font-size: 15px;
    margin-top: 20px;
    text-align: right;
}

.wc-profile-referral-code .alert-custom a {
    color: #2774e8;
    font-weight: 600;
    text-decoration: none;
    transition: all 0.3s ease;
}

.wc-profile-referral-code .alert-custom a:hover {
    text-decoration: underline;
    color: #1a5cb0;
}

/* === إعدادات التصميم المخصصة === */
.referral-admin-wrapper .form-table input[type="color"] {
    width: 60px;
    height: 40px;
    border: none;
    border-radius: 4px;
    cursor: pointer;
}

.referral-admin-wrapper .form-table input[type="number"] {
    width: 80px;
}

.referral-admin-wrapper .form-table input[type="text"] {
    width: 300px;
}

/* === التنبيهات === */
.rr-alert {
    position: fixed;
    top: 20px;
    right: 20px;
    padding: 15px 20px;
    border-radius: 8px;
    color: #fff;
    font-weight: bold;
    z-index: 9999;
    animation: slideIn 0.3s ease;
}

.rr-alert-success {
    background-color: #4CAF50;
}

.rr-alert-error {
    background-color: #f44336;
}

.rr-alert-warning {
    background-color: #ff9800;
}

.rr-alert-info {
    background-color: #2196F3;
}

.rr-alert.fade-out {
    animation: slideOut 0.3s ease forwards;
}

@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;
    }
}

/* === الأزرار المخصصة === */
.referral-buttons {
    display: flex;
    gap: 15px;
    margin-top: 20px;
    flex-wrap: wrap;
}

.custom-button,
.second-button {
    background-color: var(--rr-primary-color, #2563eb);
    color: var(--rr-button-text-color, #ffffff);
    padding: 12px 24px;
    text-decoration: none;
    border-radius: var(--rr-button-border-radius, 8px);
    display: inline-block;
    font-weight: bold;
    transition: all 0.3s ease;
    border: none;
    cursor: pointer;
    font-size: 14px;
}

.custom-button:hover,
.second-button:hover {
    background-color: var(--rr-secondary-color, #1e40af);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.second-button {
    background-color: var(--rr-secondary-color, #1e40af);
}

.second-button:hover {
    background-color: var(--rr-primary-color, #2563eb);
}

/* === تحسينات إضافية === */
.referral-container h3 {
    text-align: center;
    margin-bottom: 25px;
    color: var(--rr-text-color, #333333);
    font-size: 24px;
    font-weight: bold;
}

.referral-tabs-nav {
    margin-bottom: 25px;
}

.referral-tab-content {
    min-height: 200px;
}

.referral-box strong {
    color: var(--rr-primary-color, #2563eb);
    font-weight: bold;
}

/* === تحسينات للأجهزة المحمولة === */
@media (max-width: 768px) {
    .referral-buttons {
        flex-direction: column;
    }
    
    .referral-tabs-nav {
        flex-wrap: wrap;
    }
    
    .referral-tabs-nav button {
        flex: 1;
        min-width: 120px;
    }
    
    .referral-code-box {
        flex-direction: column;
        align-items: stretch;
    }
    
    #referral-code-input {
        width: 100% !important;
        margin-bottom: 10px;
    }
} 