/* public/css/cwp-public.css - Dynamic and clean styling */

/* 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;
    box-sizing: border-box;
}

/* Full Page Mode */
.cwp-final-wrapper.cwp-final-full {
    position: fixed; inset: 0; z-index: 99999;
    display: flex; justify-content: center; align-items: center;
    background-size: cover; background-position: center;
    background-color: rgba(0,0,0,0.8);
    /* Dynamic background image will be set by JS */
}
body.cwp-final-full-active { overflow: hidden !important; }

/* 2. The Main Card */
.cwp-final-card {
    background: var(--cwp-card-bg, #fff);
    color: var(--cwp-text, #333);
    border-radius: var(--cwp-radius, 8px);
    padding: 30px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.1);
    position: relative;
    width: 100%;
    max-width: 500px;
    min-height: 300px;
}

/* 3. Header */
.cwp-header {
    display: flex; align-items: center; gap: 15px;
    margin-bottom: 25px; border-bottom: 1px solid rgba(0,0,0,0.05);
    padding-bottom: 15px;
}
.cwp-icon-box {
    width: 40px; height: 40px; border-radius: 4px;
    display: flex; align-items: center; justify-content: center;
    background: var(--cwp-primary, #0073AA);
}
.cwp-icon-box img { max-width: 100%; max-height: 100%; object-fit: contain; }
.cwp-icon-box svg { fill: #fff; width: 24px; }

.cwp-title-box h3 {
    margin: 0; font-size: 20px; font-weight: 700; color: var(--cwp-primary);
}
.cwp-title-box p { margin: 2px 0 0; font-size: 13px; opacity: 0.8; }

/* 4. Progress Bar */
.cwp-final-progress-wrap { margin-bottom: 20px; }
.cwp-final-progress {
    height: 6px; background: var(--cwp-input-bg); border-radius: 10px; overflow: hidden;
}
.cwp-final-progress i {
    display: block; height: 100%;
    background: var(--cwp-primary);
    width: 0%; transition: width 0.4s ease;
}

/* 5. Inputs */
.cwp-final-step { animation: fadeIn 0.4s ease; }
@keyframes fadeIn { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: translateY(0); } }

.cwp-label-with-icon {
    display: flex; align-items: center; gap: 8px;
    font-size: 16px; font-weight: 700; margin-bottom: 10px;
    color: var(--cwp-text);
}

.cwp-final-input {
    width: 100%; padding: 12px 15px;
    background: var(--cwp-input-bg, #f8f8f8);
    border: 1px solid rgba(0,0,0,0.1);
    color: var(--cwp-text);
    font-size: 15px; border-radius: var(--cwp-radius, 8px);
    transition: all 0.3s;
    box-sizing: border-box;
}
.cwp-final-input:focus {
    border-color: var(--cwp-primary, #0073AA);
    box-shadow: 0 0 0 2px rgba(0, 115, 170, 0.1);
    outline: none;
}

/* 6. Buttons */
.cwp-actions { display: flex; justify-content: space-between; margin-top: 30px; }
.cwp-final-btn {
    padding: 10px 25px; border-radius: var(--cwp-radius, 8px); border: 0;
    font-weight: 700; font-size: 15px; cursor: pointer;
    transition: all 0.2s;
}

.cwp-btn-next {
    background: var(--cwp-primary, #0073AA);
    color: #fff;
    margin-right: auto;
}
.cwp-btn-next:hover { opacity: 0.9; }

.cwp-btn-back {
    background: #ccc; 
    color: #333;
}

/* 7. Loader & Success */
.cwp-loader { text-align: center; padding: 30px; }
.cwp-spinner {
    width: 40px; height: 40px; border: 4px solid rgba(0,0,0,0.1);
    border-top-color: var(--cwp-primary);
    border-radius: 50%; margin: 0 auto 15px;
    animation: spin 1s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

.cwp-success-box {
    text-align: center; padding: 20px;
    border: 1px solid var(--cwp-primary);
    border-radius: var(--cwp-radius, 8px); background: var(--cwp-input-bg);
}