/* 🎯 Simple Marketing Offers System CSS
 * نظام العروض التسويقية البسيط - التصميم
 * 
 * @version 2.0.0
 * @author Hozi Theme
 */

/* ===== BASE OFFER STYLES ===== */
.professional-offer {
    margin: 20px 0;
    border-radius: 12px;
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.15);
    overflow: hidden;
    position: relative;
    transition: all 0.3s ease;
    opacity: 0;
    transform: translateY(20px);
}

.professional-offer.fade-in {
    opacity: 1;
    transform: translateY(0);
}

/* Flash Offer Styles */
.simple-flash-offer {
    background: linear-gradient(135deg, #e74c3c 0%, #c0392b 100%);
    color: white;
    padding: 25px;
    position: relative;
    overflow: hidden;
}

.simple-flash-offer::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.2), transparent);
    animation: shimmer 2s infinite;
}

.simple-flash-offer.pulse {
    animation: pulse 2s infinite;
}

/* Bundle Offer Styles */
.simple-bundle-offer {
    background: linear-gradient(135deg, #27ae60 0%, #2ecc71 100%);
    color: white;
    padding: 25px;
    position: relative;
    overflow: hidden;
}

.simple-bundle-offer::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.2), transparent);
    animation: shimmer 3s infinite;
}

.simple-bundle-offer.shake {
    animation: shake 0.5s ease-in-out;
}

/* ===== OFFER CONTENT ===== */
.offer-content {
    position: relative;
    z-index: 2;
}

.offer-content h3 {
    margin: 0 0 15px 0;
    font-size: 1.6em;
    font-weight: bold;
    text-shadow: 0 2px 4px rgba(0,0,0,0.3);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
}

.offer-content p {
    margin: 0 0 20px 0;
    font-size: 1.1em;
    opacity: 0.95;
    line-height: 1.5;
}

/* ===== OFFER PRICES ===== */
.offer-prices {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 15px;
    margin: 20px 0;
    flex-wrap: wrap;
}

.original-price {
    font-size: 1.2em;
    text-decoration: line-through;
    opacity: 0.7;
    font-weight: normal;
}

.discounted-price {
    font-size: 1.8em;
    font-weight: bold;
    color: #fff;
    text-shadow: 0 2px 4px rgba(0,0,0,0.3);
}

.discount-badge {
    background: rgba(255, 255, 255, 0.2);
    padding: 8px 15px;
    border-radius: 20px;
    font-size: 0.9em;
    font-weight: bold;
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.3);
}

/* ===== OFFER TIMER ===== */
.offer-timer {
    margin-top: 20px;
    text-align: center;
}

.timer-label {
    display: block;
    font-size: 0.9em;
    opacity: 0.8;
    margin-bottom: 8px;
}

.timer-display {
    font-size: 1.4em;
    font-weight: bold;
    font-family: 'Courier New', monospace;
    background: rgba(0, 0, 0, 0.2);
    padding: 10px 15px;
    border-radius: 8px;
    display: inline-block;
    min-width: 120px;
    text-align: center;
    border: 2px solid rgba(255, 255, 255, 0.3);
    animation: timer-glow 2s ease-in-out infinite alternate;
}

.timer-display.urgent {
    background: rgba(231, 76, 60, 0.8);
    animation: urgent-pulse 1s infinite;
    border-color: rgba(231, 76, 60, 0.6);
}

.timer-display.expired,
.timer-display-compact.expired {
    background: rgba(128, 128, 128, 0.8);
    color: #ccc;
    border-color: rgba(128, 128, 128, 0.6);
    animation: none;
}

/* Bundle Offer Specific Styles */
.bundle-offer .discount-badge {
    background: rgba(255, 255, 255, 0.3);
    color: #fff;
    font-weight: bold;
    text-shadow: 0 1px 2px rgba(0,0,0,0.3);
}

.bundle-offer .discount-badge-compact {
    background: rgba(255, 255, 255, 0.3);
    color: #fff;
    font-weight: bold;
    text-shadow: 0 1px 2px rgba(0,0,0,0.3);
}

/* Flash Offer Specific Styles */
.simple-flash-offer .timer-display {
    background: rgba(231, 76, 60, 0.3);
    border-color: rgba(231, 76, 60, 0.5);
    color: #fff;
}

.simple-flash-offer-compact .timer-display-compact {
    background: rgba(231, 76, 60, 0.3);
    border-color: rgba(231, 76, 60, 0.5);
    color: #fff;
}

/* ===== CART OFFERS ===== */
.bundle-offer-cart,
.flash-offer-cart {
    background: linear-gradient(135deg, #3498db 0%, #2980b9 100%);
    color: white;
    padding: 20px;
    margin: 15px 0;
    border-radius: 10px;
    box-shadow: 0 4px 15px rgba(52, 152, 219, 0.3);
}

.bundle-offer-cart h3,
.flash-offer-cart h3 {
    margin: 0 0 10px 0;
    font-size: 1.3em;
    font-weight: bold;
}

.bundle-offer-cart p,
.flash-offer-cart p {
    margin: 0;
    font-size: 1em;
    opacity: 0.9;
}

/* ===== CHECKOUT OFFERS ===== */
.checkout-offer {
    background: linear-gradient(135deg, #9b59b6 0%, #8e44ad 100%);
    color: white;
    padding: 20px;
    margin: 15px 0;
    border-radius: 10px;
    box-shadow: 0 4px 15px rgba(155, 89, 182, 0.3);
    text-align: center;
}

.checkout-offer h3 {
    margin: 0 0 10px 0;
    font-size: 1.4em;
    font-weight: bold;
}

.checkout-offer p {
    margin: 0;
    font-size: 1.1em;
    opacity: 0.9;
}

/* ===== ANIMATIONS ===== */
@keyframes shimmer {
    0% { left: -100%; }
    100% { left: 100%; }
}

@keyframes pulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.02); }
}

@keyframes shake {
    0%, 100% { transform: translateX(0); }
    25% { transform: translateX(-5px); }
    75% { transform: translateX(5px); }
}

@keyframes urgent-pulse {
    0%, 100% { 
        background: rgba(231, 76, 60, 0.8);
        transform: scale(1);
    }
    50% { 
        background: rgba(231, 76, 60, 1);
        transform: scale(1.05);
    }
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes timer-glow {
    from {
        box-shadow: 0 0 10px rgba(255, 255, 255, 0.5);
    }
    to {
        box-shadow: 0 0 20px rgba(255, 255, 255, 0.8);
    }
}

/* ===== HOVER EFFECTS ===== */
.professional-offer:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.2);
}

.simple-flash-offer:hover {
    box-shadow: 0 8px 25px rgba(231, 76, 60, 0.4);
}

.simple-bundle-offer:hover {
    box-shadow: 0 8px 25px rgba(39, 174, 96, 0.4);
}

/* ===== EXPIRED OFFER ===== */
.professional-offer.expired {
    opacity: 0.6;
    filter: grayscale(50%);
}

.professional-offer.expired .timer-display {
    background: rgba(149, 165, 166, 0.8);
    color: #2c3e50;
}

/* ===== RTL SUPPORT ===== */
.rtl .offer-content h3 {
    flex-direction: row-reverse;
}

.rtl .offer-prices {
    flex-direction: row-reverse;
}

.rtl .timer-display {
    font-family: 'Courier New', monospace;
}

/* ===== RESPONSIVE DESIGN ===== */
@media (max-width: 768px) {
    .professional-offer {
        margin: 15px 0;
        padding: 20px;
    }
    
    .offer-content h3 {
        font-size: 1.4em;
        flex-direction: column;
        gap: 5px;
    }
    
    .offer-content p {
        font-size: 1em;
        margin-bottom: 15px;
    }
    
    .offer-prices {
        flex-direction: column;
        gap: 10px;
    }
    
    .original-price {
        font-size: 1.1em;
    }
    
    .discounted-price {
        font-size: 1.6em;
    }
    
    .discount-badge {
        font-size: 0.8em;
        padding: 6px 12px;
    }
    
    .timer-display {
        font-size: 1.2em;
        min-width: 100px;
        padding: 8px 12px;
    }
    
    .bundle-offer-cart,
    .flash-offer-cart,
    .checkout-offer {
        padding: 15px;
        margin: 10px 0;
    }
    
    .bundle-offer-cart h3,
    .flash-offer-cart h3,
    .checkout-offer h3 {
        font-size: 1.2em;
    }
    
    .bundle-offer-cart p,
    .flash-offer-cart p,
    .checkout-offer p {
        font-size: 0.9em;
    }
}

@media (max-width: 480px) {
    .professional-offer {
        padding: 15px;
        margin: 10px 0;
    }
    
    .offer-content h3 {
        font-size: 1.2em;
    }
    
    .offer-content p {
        font-size: 0.9em;
    }
    
    .discounted-price {
        font-size: 1.4em;
    }
    
    .timer-display {
        font-size: 1em;
        min-width: 80px;
        padding: 6px 10px;
    }
}

/* ===== PRINT STYLES ===== */
@media print {
    .professional-offer {
        box-shadow: none;
        border: 2px solid #000;
        break-inside: avoid;
    }
    
    .offer-timer {
        display: none;
    }
    
    .professional-offer::before {
        display: none;
    }
}

/* ===== ACCESSIBILITY ===== */
@media (prefers-reduced-motion: reduce) {
    .professional-offer,
    .simple-flash-offer,
    .simple-bundle-offer {
        animation: none;
    }
    
    .simple-flash-offer::before,
    .simple-bundle-offer::before {
        animation: none;
    }
    
    .timer-display.urgent {
        animation: none;
    }
}

/* ===== HIGH CONTRAST MODE ===== */
@media (prefers-contrast: high) {
    .professional-offer {
        border: 2px solid #000;
    }
    
    .timer-display {
        border: 2px solid #fff;
    }
    
    .discount-badge {
        border: 2px solid #fff;
        background: rgba(0, 0, 0, 0.8);
    }
}

/* ===== DARK MODE SUPPORT ===== */
@media (prefers-color-scheme: dark) {
    .professional-offer {
        box-shadow: 0 6px 20px rgba(255, 255, 255, 0.1);
    }
}

/* ===== FOCUS STATES ===== */
.professional-offer:focus-within {
    outline: 3px solid #007cba;
    outline-offset: 2px;
}

.timer-display:focus {
    outline: 2px solid #fff;
    outline-offset: 2px;
}

/* ===== LOADING STATES ===== */
.professional-offer.loading {
    opacity: 0.7;
    pointer-events: none;
}

.professional-offer.loading::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 20px;
    height: 20px;
    margin: -10px 0 0 -10px;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-top: 2px solid #fff;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* ===== COMPACT OFFER STYLES (ABOVE FORM) ===== */
.offers-above-form-container {
    margin: 15px 0;
    padding: 0;
    display: block !important;
    visibility: visible !important;
    position: relative;
    z-index: 10;
    clear: both;
    width: 100%;
}

.professional-offer-compact {
    margin: 6px 0;
    border-radius: 8px;
    box-shadow: 0 3px 12px rgba(0, 0, 0, 0.12);
    overflow: hidden;
    position: relative;
    transition: all 0.3s ease;
    opacity: 0;
    transform: translateY(8px);
    animation: fadeInUp 0.4s ease forwards;
    display: block !important;
    visibility: visible !important;
}

.professional-offer-compact.fade-in {
    opacity: 1;
    transform: translateY(0);
}

/* Compact Flash Offer */
.simple-flash-offer-compact {
    background: linear-gradient(135deg, #e74c3c 0%, #c0392b 100%);
    color: white;
    padding: 10px 12px;
    position: relative;
    overflow: hidden;
}

.simple-flash-offer-compact::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.2), transparent);
    animation: shimmer 2s infinite;
}

.simple-flash-offer-compact.pulse {
    animation: pulse 2s infinite;
}

/* Compact Bundle Offer */
.simple-bundle-offer-compact {
    background: linear-gradient(135deg, #27ae60 0%, #2ecc71 100%);
    color: white;
    padding: 10px 12px;
    position: relative;
    overflow: hidden;
}

.simple-bundle-offer-compact::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.2), transparent);
    animation: shimmer 3s infinite;
}

.simple-bundle-offer-compact.shake {
    animation: shake 0.5s ease-in-out;
}

/* Compact Offer Content */
.offer-content-compact {
    position: relative;
    z-index: 2;
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 8px;
}

.offer-header-compact {
    display: flex;
    align-items: center;
    gap: 8px;
    flex: 1;
    min-width: 180px;
}

.offer-header-compact h4 {
    margin: 0;
    font-size: 1em;
    font-weight: bold;
    text-shadow: 0 1px 2px rgba(0,0,0,0.3);
    display: flex;
    align-items: center;
    gap: 4px;
}

.discount-badge-compact {
    background: rgba(255, 255, 255, 0.2);
    padding: 3px 6px;
    border-radius: 10px;
    font-size: 0.75em;
    font-weight: bold;
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.3);
    white-space: nowrap;
}

/* Compact Offer Prices */
.offer-prices-compact {
    display: flex;
    align-items: center;
    gap: 6px;
    flex-shrink: 0;
}

.original-price-compact {
    font-size: 0.85em;
    text-decoration: line-through;
    opacity: 0.7;
    font-weight: normal;
}

.discounted-price-compact {
    font-size: 1.1em;
    font-weight: bold;
    color: #fff;
    text-shadow: 0 1px 2px rgba(0,0,0,0.3);
}

/* Compact Offer Timer */
.offer-timer-compact {
    flex-shrink: 0;
    text-align: center;
}

.timer-display-compact {
    font-size: 0.9em;
    font-weight: bold;
    font-family: 'Courier New', monospace;
    background: rgba(0, 0, 0, 0.2);
    padding: 4px 8px;
    border-radius: 4px;
    display: inline-block;
    min-width: 70px;
    text-align: center;
    border: 1px solid rgba(255, 255, 255, 0.3);
}

.timer-display-compact.urgent {
    background: rgba(231, 76, 60, 0.8);
    animation: urgent-pulse 1s infinite;
    border-color: rgba(231, 76, 60, 0.6);
}

.timer-display-compact.expired {
    background: rgba(128, 128, 128, 0.8);
    color: #ccc;
    border-color: rgba(128, 128, 128, 0.6);
    animation: none;
}

/* Compact Offer Hover Effects */
.professional-offer-compact:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.15);
}

.simple-flash-offer-compact:hover {
    box-shadow: 0 4px 15px rgba(231, 76, 60, 0.3);
}

.simple-bundle-offer-compact:hover {
    box-shadow: 0 4px 15px rgba(39, 174, 96, 0.3);
}

/* Compact Offer Responsive */
@media (max-width: 768px) {
    .offer-content-compact {
        flex-direction: column;
        align-items: stretch;
        gap: 6px;
    }
    
    .offer-header-compact {
        justify-content: center;
        min-width: auto;
    }
    
    .offer-header-compact h4 {
        font-size: 0.9em;
    }
    
    .offer-prices-compact {
        justify-content: center;
    }
    
    .original-price-compact {
        font-size: 0.8em;
    }
    
    .discounted-price-compact {
        font-size: 1em;
    }
    
    .timer-display-compact {
        font-size: 0.85em;
        min-width: 65px;
        padding: 4px 6px;
    }
}

@media (max-width: 480px) {
    .professional-offer-compact {
        padding: 8px 10px;
        margin: 5px 0;
    }
    
    .offer-header-compact h4 {
        font-size: 0.85em;
    }
    
    .discount-badge-compact {
        font-size: 0.7em;
        padding: 2px 5px;
    }
    
    .discounted-price-compact {
        font-size: 0.95em;
    }
    
    .timer-display-compact {
        font-size: 0.8em;
        min-width: 60px;
        padding: 3px 5px;
    }
}

/* ===== ADMIN STYLES ===== */
.target-products-options {
    margin-bottom: 15px;
}

.target-products-options label {
    display: block;
    margin-bottom: 8px;
    font-weight: 500;
}

.target-products-options input[type="radio"] {
    margin-right: 8px;
}

.specific-products-container {
    background: #f9f9f9;
    border: 1px solid #ddd;
    border-radius: 5px;
    padding: 15px;
    margin-top: 10px;
}

.products-search-container input {
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 14px;
}

.products-checkbox-container {
    background: white;
    border-radius: 4px;
}

.products-checkbox-container label {
    display: flex;
    align-items: center;
    padding: 5px 0;
    border-bottom: 1px solid #f0f0f0;
    margin-bottom: 0;
    font-weight: normal;
}

.products-checkbox-container label:last-child {
    border-bottom: none;
}

.products-checkbox-container input[type="checkbox"] {
    margin-right: 8px;
    margin-left: 0;
}

.products-checkbox-container small {
    margin-left: 8px;
    font-size: 11px;
}

.description {
    margin-top: 10px;
    font-style: italic;
    color: #666;
}

/* RTL Support for Admin */
.rtl .target-products-options input[type="radio"] {
    margin-right: 0;
    margin-left: 8px;
}

.rtl .products-checkbox-container input[type="checkbox"] {
    margin-right: 0;
    margin-left: 8px;
}

.rtl .products-checkbox-container small {
    margin-left: 0;
    margin-right: 8px;
}

/* ===== SUCCESS MESSAGE ===== */
/* ✅ تم تحميل نظام العروض البسيط CSS بنجاح - الإصدار 2.1.0 */ 