
/* === CWP PATCH: Scoped overlay & card styles (safe) === */
.cwp-final-wrapper.cwp-final-full {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 120000;
  display: flex;
  align-items: center;
  justify-content: center;
  background: radial-gradient(ellipse at center, rgba(8,8,8,0.95), rgba(4,4,4,0.95));
  -webkit-overflow-scrolling: touch;
}

/* Avoid overlapping WP admin bar if present */
body.admin-bar .cwp-final-wrapper.cwp-final-full { top: 32px; bottom: 0; }

/* Prevent document scroll while overlay active */
body.cwp-final-full-active { overflow: hidden !important; height: 100% !important; }

/* Close button attached to body so it appears above admin bar */
.cwp-close-btn {
  position: fixed;
  top: 18px;
  right: 22px;
  z-index: 200001;
  width: 48px;
  height: 48px;
  border-radius: 8px;
  background: rgba(0,0,0,0.6);
  color: #fff;
  border: 0;
  display:flex;
  align-items:center;
  justify-content:center;
  font-size:22px;
  cursor:pointer;
  box-shadow: 0 6px 18px rgba(0,0,0,0.35);
}
.cwp-close-btn:hover { transform: translateY(-2px); }

/* Card styles */
.cwp-final-card { width:780px; max-width:calc(100% - 60px); border-radius:14px; padding:28px; background:linear-gradient(180deg, rgba(12,12,12,0.98), rgba(6,6,6,0.92)); box-shadow:0 20px 60px rgba(0,0,0,0.6); color:#fff; direction:rtl; font-family: Tajawal, Arial, sans-serif; }
/* Progress / inputs / buttons */
.cwp-progress { height:10px; background:rgba(255,255,255,0.04); border-radius:6px; overflow:hidden; margin:12px 0 18px; }
.cwp-progress > span { display:block; height:100%; width:0%; background:linear-gradient(90deg,#ffd400,#ff8a00); border-radius:6px; transition:width .45s ease; }
.cwp-label { color:#ffd400; font-weight:700; margin-bottom:8px; }
.cwp-input { width:100%; padding:12px 14px; border-radius:8px; border:1px solid rgba(255,255,255,0.06); background:rgba(255,255,255,0.03); color:#fff; box-sizing:border-box; }
.cwp-actions { margin-top:16px; display:flex; gap:10px; justify-content:flex-end; }
.cwp-btn { padding:10px 18px; border-radius:10px; border:0; cursor:pointer; font-weight:700; }
.cwp-btn.primary { background:linear-gradient(90deg,#ffd400,#ff8a00); color:#111; }
.cwp-btn.ghost { background:transparent; color:#fff; border:1px solid rgba(255,255,255,0.06); }
.cwp-success { text-align:center; padding:20px; border-radius:8px; }
.cwp-recommended { display:flex; gap:12px; flex-wrap:wrap; margin-top:14px; }
.cwp-recommended .item { width:160px; background:rgba(255,255,255,0.03); padding:8px; border-radius:8px; text-align:center; }
/* === End CWP PATCH === */


/* === Consult Wizard - Fullpage overlay styles (isolated, won't affect WP Admin) === */

/* Full viewport overlay when using shortcode with fullpage="1" */
.cwp-final-wrapper.cwp-final-full {
    position: fixed;
    inset: 0;
    z-index: 99999;
    display: flex;
    align-items: center;
    justify-content: center;
    /* background will be set inline via JS to support admin-configured image; fallback gradient: */
    background: radial-gradient(ellipse at center, rgba(10,10,10,0.95) 0%, rgba(0,0,0,0.95) 60%);
    background-size: cover;
    background-position: center;
    -webkit-overflow-scrolling: touch;
}

/* Prevent page scroll when fullpage active (applied via JS class on body) */
body.cwp-final-full-active {
    overflow: hidden !important;
    height: 100% !important;
}

/* Card -- centered, modern look */
.cwp-final-card {
    width: 720px;
    max-width: calc(100% - 60px);
    border-radius: 12px;
    padding: 28px 30px;
    background: linear-gradient(180deg, rgba(18,18,18,0.95), rgba(8,8,8,0.88));
    box-shadow: 0 10px 40px rgba(0,0,0,0.6), 0 4px 12px rgba(0,0,0,0.35);
    border: 1px solid rgba(255,255,255,0.03);
    color: #ffffff;
    direction: rtl;
    font-family: 'Tajawal', 'Cairo', sans-serif;
}

/* Header */
.cwp-final-card .cwp-header {
    display:flex;
    align-items:center;
    justify-content:space-between;
    margin-bottom:18px;
}
.cwp-final-card h2 { margin:0; font-size:20px; font-weight:700; color:#fff; }

/* Progress bar */
.cwp-progress { height:10px; background:rgba(255,255,255,0.06); border-radius:6px; overflow:hidden; margin:12px 0 20px; }
.cwp-progress > span { display:block; height:100%; width:0%; background:linear-gradient(90deg,#ffd400,#ff8a00); border-radius:6px; transition:width .45s ease; }

/* Input */
.cwp-final-input { width:100%; padding:14px 16px; border-radius:8px; background:rgba(255,255,255,0.03); border:1px solid rgba(255,255,255,0.04); color:#fff; box-sizing:border-box; }
.cwp-label-with-icon { display:flex; align-items:center; gap:10px; margin-bottom:8px; color:#ffd400; font-weight:700; }

/* Button */
.cwp-btn { display:inline-block; padding:12px 22px; border-radius:8px; background:linear-gradient(90deg,#ffd400,#ff8a00); color:#111; font-weight:700; border:none; cursor:pointer; box-shadow:0 6px 18px rgba(255,138,0,0.12); }

/* Success box tweak */
.cwp-success-box { border-radius:10px; padding:20px; text-align:center; }

/* Make sure admin area unaffected by these rules because they are scoped to .cwp-final-wrapper and .cwp-final-card */


/* === End of Consult Wizard overlay styles ===

Place other legacy rules below (kept for backward compat) */

/* Start of assets/css/style.css - الكود المُحدث للتصميم الرياضي الاحترافي */

/* 1. Global Wrapper & Fonts */
.cwp-final-wrapper {
    max-width: 800px;
    margin: 40px auto;
    font-family: 'Tajawal', 'Cairo', sans-serif; 
    direction: rtl;
    position: relative;
    z-index: 1;
}

/* التنسيق الجديد لوضع ملء الشاشة (Full Page) */
.cwp-final-wrapper.cwp-final-full {
    max-width: none; 
    margin: 0;
    padding: 0;
    display: flex; 
    justify-content: center;
    align-items: center;
    min-height: 100vh;
}
.cwp-final-wrapper.cwp-final-full /* إصلاح الخلفية: إذا كانت الإضافة في وضع ملء الشاشة، فإننا نضمن أن عنصر HTML الرئيسي غير شفاف ليعمل background-attachment: fixed */
/* 2. The Main Card - خلفية رياضية مع تباين عالي */
.cwp-final-card {
    background: linear-gradient(145deg, #121212, #000000); /* أسود فاحم */
    color: #fff;
    border-radius: 16px;
    padding: 30px;
    box-shadow: 0 15px 40px rgba(0,0,0,0.8); /* ظل أعمق */
    border: 1px solid #333;
    position: relative;
    overflow: hidden;
    min-height: 400px;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

/* صورة ظلية (Silhouette) للبطل في الخلفية */
.cwp-final-card::after {
    content: "";
    position: absolute;
    bottom: -20px;
    left: -20px;
    width: 250px;
    height: 300px;
    background-image: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 512 512"><path fill="#000" d="M128 0C57.3 0 0 57.3 0 128v256c0 70.7 57.3 128 128 128h256c70.7 0 128-57.3 128-128V128C512 57.3 454.7 0 384 0H128zM384 480c-53 0-96-43-96-96s43-96 96-96 96 43 96 96-43 96-96 96zM128 480c-53 0-96-43-96-96s43-96 96-96 96 43 96 96-43 96-96 96zM256 160c-17.7 0-32 14.3-32 32v128c0 17.7 14.3 32 32 32s32-14.3 32-32V192c0-17.7-14.3-32-32-32z"/></svg>'); 
    background-repeat: no-repeat;
    background-size: contain;
    opacity: 0.03; /* أقل شفافية */
    z-index: -1;
    transform: rotate(10deg);
}


/* 3. Header Styling - مع تعديل تناسب الشعار */
.cwp-header-gym {
    display: flex;
    align-items: center;
    justify-content: space-between; 
    gap: 15px;
    margin-bottom: 25px;
    border-bottom: 2px solid rgba(255,255,255,0.1);
    padding-bottom: 15px;
}
.cwp-icon-box {
    width: 55px;
    height: 55px;
    background: #eef000; /* الخلفية الافتراضية لأيقونة 'Gym' */
    color: #000;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 12px;
    font-weight: 900;
    font-size: 24px;
    box-shadow: 0 0 15px rgba(238, 240, 0, 0.4);
    flex-shrink: 0;
}
/* التعديل لضمان تناسب الشعار وعدم ظهور الخلفية الصفراء */
.cwp-icon-box.cwp-icon-img {
    background: transparent; /* إزالة اللون الأصفر */
    padding: 5px; /* ترك مساحة للإطار */
    border: 2px solid #eef000; /* إضافة إطار نيون */
    box-shadow: none; /* إزالة ظل الـ box نفسه */
}
.cwp-icon-box.cwp-icon-img img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain; /* الاحتفاظ بنسبة العرض إلى الارتفاع */
    border-radius: 8px; /* تقليل حواف الصورة قليلاً */
}

.cwp-title-box {
    text-align: right;
    flex-grow: 1;
}
.cwp-title-box h3 {
    margin: 0;
    font-size: 22px;
    font-weight: 800;
    color: #fff;
    text-transform: uppercase;
    letter-spacing: 1px;
}
.cwp-title-box p {
    margin: 4px 0 0;
    font-size: 14px;
    color: #bbb;
}

/* 4. Progress Bar */
.cwp-final-progress-wrap {
    margin-bottom: 30px;
}
.cwp-final-progress {
    height: 10px;
    background: rgba(255,255,255,0.1);
    border-radius: 20px;
    overflow: hidden;
}
.cwp-final-progress i {
    display: block;
    height: 100%;
    background: linear-gradient(90deg, #eef000, #ffae00);
    width: 0%;
    transition: width 0.4s cubic-bezier(0.25, 1, 0.5, 1);
    box-shadow: 0 0 10px #eef000;
}

/* 5. Form & Inputs */
.cwp-final-step {
    animation: fadeInRight 0.5s ease;
}
@keyframes fadeInRight {
    from { opacity: 0; transform: translateX(20px); }
    to { opacity: 1; transform: translateX(0); }
}

.cwp-label-with-icon {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 18px;
    font-weight: 700;
    margin-bottom: 12px;
    color: #eef000;
}
.cwp-label-with-icon svg {
    width: 24px;
    height: 24px;
    fill: #eef000;
    flex-shrink: 0;
}

.cwp-final-input {
    width: 100%;
    padding: 14px 18px;
    background: rgba(255,255,255,0.05);
    border: 2px solid transparent;
    border-bottom: 2px solid #444;
    color: #fff;
    font-size: 16px;
    border-radius: 8px;
    transition: all 0.3s;
}
.cwp-final-input:focus {
    background: rgba(0,0,0,0.3);
    border-bottom-color: #eef000;
    outline: none;
    box-shadow: 0 5px 15px rgba(0,0,0,0.2);
}

/* 6. Buttons - تصميم رياضي حماسي وعصري */
.cwp-actions {
    display: flex;
    justify-content: flex-end; 
    margin-top: 35px; 
    gap: 15px;
}
.cwp-final-btn {
    padding: 16px 35px; 
    border-radius: 8px; 
    border: none;
    font-weight: 900; 
    font-size: 17px; 
    cursor: pointer;
    transition: all 0.2s ease-in-out; 
    text-transform: uppercase;
    letter-spacing: 1px;
    outline: none;
    flex-shrink: 0;
    min-width: 140px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.4); 
    transform: translateZ(0); 
}

/* زر التالي (Next/Submit) - تصميم متدرج طاقي 3D */
.cwp-btn-next {
    background: linear-gradient(135deg, #eef000 0%, #ffae00 100%); 
    color: #1a1a1a;
    text-shadow: 0 1px 0 rgba(255, 255, 255, 0.3);
}
.cwp-btn-next:hover {
    transform: translateY(-3px); 
    box-shadow: 0 8px 20px rgba(255, 165, 0, 0.6); 
    background: linear-gradient(135deg, #ffffff 0%, #fff7b3 100%);
}
.cwp-btn-next:active {
    transform: translateY(0); 
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.5), inset 0 2px 5px rgba(0, 0, 0, 0.2); 
}

/* زر الرجوع (Back) - تصميم داكن حماسي جديد */
.cwp-btn-back {
    background: #1a1a1a; /* خلفية داكنة */
    color: #eef000; /* نص نيون */
    border: 2px solid #eef000; /* حدود نيون */
    box-shadow: 0 4px 10px rgba(238, 240, 0, 0.2); 
}
.cwp-btn-back:hover {
    background: #000; /* أغمق عند التمرير */
    color: #fff; /* نص أبيض */
    border-color: #fff; /* حدود بيضاء */
    transform: translateY(-2px);
    box-shadow: 0 6px 15px rgba(238, 240, 0, 0.4);
}
.cwp-btn-back:active {
    transform: translateY(0);
    box-shadow: 0 1px 5px rgba(0, 0, 0, 0.5);
}


/* 7. Loading Animation (Dumbbell Pulse) */
.cwp-loader {
    text-align: center;
    padding: 40px;
    position: relative;
    z-index: 10; 
}
.cwp-dumbbell-anim {
    width: 60px;
    height: 10px;
    background: #eef000;
    margin: 0 auto 20px;
    border-radius: 4px;
    position: relative;
    animation: lift 1s infinite alternate ease-in-out;
}
.cwp-dumbbell-anim::before, .cwp-dumbbell-anim::after {
    content: '';
    position: absolute;
    width: 14px;
    height: 30px;
    background: #555;
    top: -10px;
    border-radius: 4px;
}
.cwp-dumbbell-anim::before { left: -5px; }
.cwp-dumbbell-anim::after { right: -5px; }

@keyframes lift {
    0% { transform: translateY(10px); }
    100% { transform: translateY(-10px); }
}

/* 8. Thank You Box */
.cwp-success-box {
    text-align: center;
    padding: 30px;
    background: rgba(0, 255, 100, 0.1);
    border: 1px solid #00ff64;
    border-radius: 12px;
}
.cwp-success-icon {
    font-size: 50px;
    color: #00ff64;
    margin-bottom: 10px;
}

/* 9. Mobile Responsiveness */
@media (max-width: 600px) {
    .cwp-final-card { padding: 20px; }
    .cwp-actions { 
        flex-direction: column; 
        gap: 10px; 
        justify-content: center;
    }
    .cwp-final-btn { 
        width: 100%; 
        transform: none; 
    }
}