/**
 * Coupon CSS Styling with Exclusive Badge and Separators
 * Enhanced Popup Design with Dark Mode Support
 */

/* Coupon Item Styling */
.dynamic-coupon {
    border-style: solid;
    border-width: 1px 3px 3px 1px;
    border-color: #007bff; /* Blue color */
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    margin: 15px 0;
    cursor: pointer;
    background-color: #fff;
    transition: all 0.3s ease;
    position: relative;
}

.dynamic-coupon:hover {
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.coupon-container {
    display: flex;
    padding: 15px;
    align-items: center;
    position: relative;
}

.coupon-left {
    width: 20%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    border-right: 1px dashed #e0e0e0;
    padding-right: 15px;
    position: relative;
}

.coupon-logo {
    width: 100%;
    max-width: 120px;
    margin-bottom: 10px;
}

.coupon-logo img {
    width: 100%;
    height: auto;
    border-radius: 5px;
}

.coupon-usage {
    font-size: 12px;
    color: #666;
    text-align: center;
    margin-top: 10px;
}

.coupon-middle {
    width: 50%;
    padding: 0 15px;
    position: relative;
}

/* Exclusive title styling with gradient */
.coupon-title.exclusive-title {
    background: linear-gradient(90deg, #4568dc, #b06ab3);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    color: transparent;
    display: inline-block;
}

.coupon-title {
    margin: 0 0 10px;
    font-size: 18px;
    font-weight: 600;
    color: #333;
}

/* Badge styling */
.coupon-badge {
    display: inline-block;
    color: white;
    padding: 3px 10px;
    border-radius: 15px;
    font-size: 12px;
    margin-right: 8px;
    margin-bottom: 10px;
}

.badge-icon {
    display: inline-block;
    margin-right: 3px;
}

/* Verified badge - green */
.coupon-verified {
    background-color: #4caf50;
}

/* Exclusive badge - gradient */
.coupon-exclusive {
    background: linear-gradient(90deg, #4568dc, #b06ab3);
}

.coupon-last-tried {
    font-size: 14px;
    color: #666;
    margin-bottom: 10px;
}

/* Improved Feedback System Styling - More modern and clean */
.feedback-container {
    margin-top: 10px;
}

.feedback {
    display: flex;
    align-items: center;
    gap: 12px;
}

.title {
    font-size: 14px;
    color: #4b5563;
    font-weight: normal;
}

.title-span {
    font-size: 28px;
    font-weight: 600; 
}

.button-group {
    display: flex;
    align-items: center;
    gap: 10px;
}

.vote-button {
    display: flex;
    align-items: center;
    gap: 6px;
    background: transparent;
    border: none;
    cursor: pointer;
    color: #4b5563;
    transition: 0.2s;
    padding: 5px 8px;
    border-radius: 4px;
    font-size: 14px;
}

.vote-button:disabled {
    cursor: not-allowed;
    opacity: 0.7;
}

.vote-button.active-like,
.vote-button.like-btn:not(:disabled):hover {
    color: #059669;
}

.vote-button.active-dislike,
.vote-button.dislike-btn:not(:disabled):hover {
    color: #dc2626;
}

.vote-button:not(:disabled):hover {
    background-color: #f3f4f6;
}

.feedback-message {
    margin-top: 8px;
    font-size: 13px;
    color: #6b7280;
    display: none;
}

.vote-button svg {
    width: 18px;
    height: 18px;
    transition: transform 0.2s;
}

.vote-button:not(:disabled):hover svg {
    transform: scale(1.1);
}

.vote-count {
    font-weight: 500;
    font-size: 14px;
}

.coupon-right {
    width: 30%;
    display: flex;
    flex-direction: column;
    align-items: center;
    padding-left: 15px;
    border-left: 1px dashed #e0e0e0;
    position: relative;
}

.coupon-discount {
    font-size: 24px;
    font-weight: 700;
    color: #4caf50;
    margin-bottom: 15px;
}

.coupon-show-btn {
    margin-bottom: 15px;
    text-align: center;
    width: 100%;
}

/* CSS Variables needed (defined at the root level) */
:root {
    --transition: all 0.5s ease-in-out;
    --p1: 28, 162, 252;
    --f5: 20, 113, 176;
    --n1: 255, 255, 255;
    --bs-border-radius-pill: 50rem;
    --grey-bg: 240, 240, 240;
}

/* Basic button structure and position styles */
.cmn-btn {
    position: relative;
    z-index: 1;
    transition: var(--transition);
}

.position-relative {
    position: relative !important;
}

.w-100 {
    width: 100% !important;
}

/* Border and shape styles */
.border-dash {
    border: 1px dashed rgba(var(--p1), 1) !important;
}

.rounded-pill {
    border-radius: var(--bs-border-radius-pill) !important;
}

/* Padding styles */
.px-4 {
    padding-right: 1rem !important;
    padding-left: 1rem !important;
}

.py-2 {
    padding-top: 0.5rem !important;
    padding-bottom: 0.5rem !important;
}

/* Responsive padding for medium screens and up */
@media (min-width: 768px) {
    .px-md-6 {
        padding-right: 1.5rem !important;
        padding-left: 1.5rem !important;
    }
    
    .py-md-3 {
        padding-top: 0.75rem !important;
        padding-bottom: 0.75rem !important;
    }
}

/* Center content alignment */
.d-center {
    display: flex;
    justify-content: center;
    align-items: center;
    background:white;
}

/* Button overlay effect */
.cmn-btn .show {
    position: absolute;
    width: 85%;
    height: 105%;
    display: flex;
    align-items: center;
    justify-content: center;
    left: -1px;
    border-radius: inherit;
    background-color: rgba(var(--p1), 1);
    z-index: 1;
    opacity: 0;
}

.cmn-btn:hover .show {
    width: 80%;
}

.cmn-btn.btn-overlay .coupon-code {
    justify-content: flex-end;
    font-size: 18px; /* Adjust this value to increase font size */
    font-weight: 700;
}

.cmn-btn.btn-overlay .show {
    opacity: 1;
     font-size: 16px;
}

/* Styling for text elements inside button */
.position-absolute {
    position: absolute !important;
}

.transition {
    transition: var(--transition);
}

.fw-semibold {
    font-weight: 600 !important;
}

/* Color classes for text */
.f5-color {
    color: rgba(var(--f5), 1);
}

.n1-color {
    color: rgba(var(--n1), 1);
}


/* Custom show code button */
.show-code-btn {
    position: relative;
    z-index: 1;
    transition: var(--transition);
    border: 1px dashed rgba(var(--p1), 1) !important;
    border-radius: 50rem;
    padding: 0.5rem 1rem;
    width: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
    cursor: pointer;
    background-color: transparent;
}

@media (min-width: 768px) {
    .show-code-btn {
        padding: 0.75rem 1.5rem;
    }
}

.show-code-btn .coupon-code {
    font-weight: 600;
    color: rgba(var(--f5), 1);
    width: 100%;
    display: flex;
    justify-content: flex-end;
    align-items: center;
    background-color: rgba(var(--grey-bg), 1);
    border-top-right-radius: 50rem;
    border-bottom-right-radius: 50rem;
    height: 100%;
    padding-right: 15px;
}

.show-code-btn .show-text {
    position: absolute;
    width: 85%;
    height: 105%;
    display: flex;
    align-items: center;
    justify-content: center;
    left: -1px;
    border-radius: inherit;
    background-color: rgba(var(--p1), 1);
    z-index: 1;
    opacity: 1;
    color: rgba(var(--n1), 1);
}

.show-code-btn:hover .show-text {
    width: 80%;
}

/* Timer styling */
.coupon-timer {
    display: flex;
    gap: 5px;
}

.timer-block {
    background-color: #f5f5f5;
    padding: 5px 6px;
    border-radius: 4px;
    font-size: 14px;
    font-weight: 600;
    color: #333;
    transition: all 0.3s ease;
}

/* Expiring timer styling - for when less than 30 minutes remain */
.timer-expiring .timer-block {
    background-color: #ffebee;
    color: #f44336;
    animation: pulse 1.5s infinite;
}

/* Timer block when time is almost up (less than 5 minutes) */
.timer-critical .timer-block {
    background-color: #f44336;
    color: white;
    animation: pulse 1s infinite;
}

/* Add pulsing animation for urgency */
@keyframes pulse {
    0% {
        opacity: 1;
    }
    50% {
        opacity: 0.7;
    }
    100% {
        opacity: 1;
    }
}

/* Expired timer styling */
.coupon-expired {
    background-color: #f44336;
    color: white;
    padding: 5px 10px;
    border-radius: 4px;
    font-weight: 600;
    text-align: center;
}

/* Coupon Filter Styles */
.coupon-filter-container {
    margin-bottom: 25px;
}
.filter-section {
    margin-bottom: 20px;
}
.filter-section h4 {
    margin-bottom: 10px;
    font-size: 16px;
    font-weight: 600;
}
.filter-options {
    max-height: 150px;
    overflow-y: auto;
    padding-right: 5px;
}
.filter-option {
    display: block;
    margin-bottom: 8px;
    cursor: pointer;
}
.filter-checkbox {
    margin-right: 8px;
}
.filter-actions {
    display: flex;
    gap: 10px;
    margin-top: 15px;
}
.filter-button {
    padding: 8px 15px;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 14px;
    background-color: #007bff;
    color: white;
    transition: background-color 0.3s;
    flex: 1;
}
.filter-button:hover {
     background-color: #0056b3 !important;
}
.filter-button.reset {
    background-color: #6c757d;
}
.filter-button.reset:hover {
    background-color: #495057 !important;
}

/* Filter results states */
.filter-loading {
    text-align: center;
    padding: 20px;
    font-style: italic;
    color: #777;
}
.filter-results-count {
    margin-bottom: 15px;
    font-size: 15px;
    color: #555;
}

/* Set fixed width for the coupon category container */
/*.container-fluid,*/
/*.rs-container {*/
/*    max-width: 1300px !important;*/
/*    width: 1300px !important;*/
/*    margin-left: auto !important;*/
/*    margin-right: auto !important;*/
/*}*/

/* Make sure the layout works on smaller screens */
/*@media (max-width: 1340px) {*/
/*    .container-fluid,*/
/*    .rs-container {*/
/*        max-width: 95% !important;*/
/*        width: 95% !important;*/
/*    }*/
/*}*/

/* Target only coupon-related pages - based on your template structure */
.single-store .container-fluid,
.single-store .rs-container,
.tax-coupon_category .container-fluid,
.tax-coupon_category .rs-container,
.single-coupon .container-fluid,
.single-coupon .rs-container {
    max-width: 1300px !important;
    width: 1300px !important;
    margin-left: auto !important;
    margin-right: auto !important;
}

@media (max-width: 1340px) {
    .single-store .container-fluid,
    .single-store .rs-container,
    .tax-coupon_category .container-fluid,
    .tax-coupon_category .rs-container,
    .single-coupon .container-fluid,
    .single-coupon .rs-container {
        max-width: 95% !important;
        width: 95% !important;
    }
}

/* Hide the "Coupon code sidebar" heading */
.coupon-category-sidebar .sidebar-title,
.sidebar-inner > h3.sidebar-title {
    display: none;
}

/* Responsive adjustments for coupon item */
@media (max-width: 768px) {
    .coupon-container {
        flex-direction: column;
    }
    
    .coupon-left, .coupon-middle, .coupon-right {
        width: 100%;
        border-right: none;
        border-bottom: 1px dashed #e0e0e0;
        padding: 15px 0;
        margin: 0;
    }
    
    .coupon-right {
        border-bottom: none;
    }
    
    .left-separator, .right-separator {
        display: none;
    }
}

/* Fix hover state on the right side of the coupon button */
.cmn-btn.btn-overlay:hover .coupon-code,
.cmn-btn.btn-overlay:focus .coupon-code {
    background-color: #f0f0f0 !important; /* Keep grey background on hover */
    color: #333 !important; /* Keep dark text on hover */
}

/* Make sure the border style is maintained on hover */
.cmn-btn.btn-overlay:hover,
.cmn-btn.btn-overlay:focus {
    border: 1px dashed rgba(var(--p1), 1) !important;
}

/* Prevent any black background from appearing on hover */
button:hover,
input[type="button"]:hover,
.cmn-btn:hover {
    background-color: transparent !important;
}

/* Fix specifically for the right part */
.coupon-code:hover {
    background-color: #f0f0f0 !important;
}

/* Desktop (default) */
.cmn-btn.btn-overlay {
    max-width: 250px; /* Desktop width */
    margin: 0 auto; /* Center the button */
}

/* For tablets (medium screens) */
@media (max-width: 992px) {
    .cmn-btn.btn-overlay {
        max-width: 220px;
    }
}

/* For mobile (small screens) */
@media (max-width: 576px) {
    .cmn-btn.btn-overlay {
        max-width: 210px;/* Full width on mobile */
        
    }
}

/* For mobile layout - remove the vertical separators */
@media (max-width: 768px) {
    /* Remove the dashed borders that create vertical separators */
    .coupon-left {
        border-right: none !important;
    }
    
    .coupon-right {
        border-left: none !important;
    }
    
    /* Also ensure the separator elements are hidden if they exist */
    .left-separator, 
    .right-separator {
        display: none !important;
    }
    
    /* Additional fix for any remaining separators */
    .coupon-middle {
        border-left: none !important;
        border-right: none !important;
    }
}

/*************************************
 * ENHANCED POPUP STYLING - NEW DESIGN
 *************************************/

/* Popup Overlay */
.coupon-popup-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.7);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 9999;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
}

.coupon-popup-overlay.active {
    opacity: 1;
    visibility: visible;
}

/* Popup Container */
.coupon-popup {
    background-color: #fff;
    border-radius: 12px;
    width: 90%;
    max-width: 500px;
    position: relative;
    transform: translateY(-20px);
    transition: all 0.3s ease;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.2);
    overflow: hidden;
}

/* Dark mode styles */
body.dark-mode .coupon-popup {
    background-color: #2d2d2d;
    color: #f0f0f0;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.5);
}

.coupon-popup-overlay.active .coupon-popup {
    transform: translateY(0);
}

/* Close button */
.popup-close {
    position: absolute;
    top: 15px;
    right: 15px;
    font-size: 24px;
    color: #777;
    cursor: pointer;
    z-index: 2;
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: all 0.2s ease;
}

.popup-close:hover {
    background-color: rgba(0, 0, 0, 0.1);
    color: #333;
}

body.dark-mode .popup-close {
    color: #aaa;
}

body.dark-mode .popup-close:hover {
    background-color: rgba(255, 255, 255, 0.1);
    color: #fff;
}

/* Store branding header */
.popup-store-header {
    padding: 25px 25px 15px;
    text-align: center;
    border-bottom: 1px solid #eee;
}

body.dark-mode .popup-store-header {
    border-bottom: 1px solid #444;
}

.popup-store-logo {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    margin: 0 auto 15px;
    display: flex;
    justify-content: center;
    align-items: center;
    overflow: hidden;
    background-color: #f5f5f5;
}

body.dark-mode .popup-store-logo {
    background-color: #3d3d3d;
}

.popup-store-logo img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* Discount display */
.popup-discount {
    font-size: 38px;
    font-weight: 700;
    margin: 15px 0 10px;
    color: #0066cc; /* Primary blue color */
}

body.dark-mode .popup-discount {
    color: #3399ff; /* Brighter blue for dark mode */
}

/* Popup title/description */
.popup-title {
    font-size: 20px;
    font-weight: 600;
    margin: 0 0 10px;
    color: #333;
    padding: 0 20px;
}

body.dark-mode .popup-title {
    color: #f0f0f0;
}

/* Code container */
.popup-body {
    padding: 20px 25px;
}

.popup-code-container {
    background-color: #f5f5f5;
    border: 2px dashed #ddd;
    padding: 12px;
    margin: 20px 0;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-radius: 6px;
    position: relative;
}

body.dark-mode .popup-code-container {
    background-color: #3d3d3d;
    border-color: #555;
}

.popup-code {
    font-size: 20px;
    font-weight: 700;
    letter-spacing: 1px;
    font-family: monospace;
    color: #333;
    flex-grow: 1;
    text-align: center;
}

body.dark-mode .popup-code {
    color: #f0f0f0;
}

.copied-message {
    position: absolute;
    top: -30px;
    left: 50%;
    transform: translateX(-50%);
    background-color: #0066cc;
    color: white;
    padding: 5px 15px;
    border-radius: 4px;
    font-size: 14px;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.copied-message.visible {
    opacity: 1;
}

/* Copy button */
.copy-btn {
    background-color: #0066cc;
    color: white;
    border: none;
    padding: 8px 20px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 600;
    transition: background-color 0.3s ease;
    display: flex;
    align-items: center;
    gap: 6px;
}

.copy-btn:hover {
    background-color: #0055aa !important;
}

.copy-btn svg {
    width: 16px;
    height: 16px;
}

/* Instructions */
.popup-instructions {
    text-align: center;
    margin: 15px 0;
    font-size: 14px;
    color: #666;
}

body.dark-mode .popup-instructions {
    color: #aaa;
}

/* Feedback section */
.popup-feedback {
    margin: 25px 0;
    text-align: center;
}

.popup-feedback-title {
    font-size: 16px;
    font-weight: 600;
    margin-bottom: 15px;
    color: #555;
}

body.dark-mode .popup-feedback-title {
    color: #ccc;
}

.popup-feedback-buttons {
    display: flex;
    justify-content: center;
    gap: 15px;
}

.feedback-btn {
    padding: 8px 20px;
    border-radius: 4px;
    border: none;
    cursor: pointer;
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 6px;
    transition: all 0.2s ease;
}

.feedback-no {
    background-color: #f0f0f0;
    color: #666;
}

.feedback-yes {
    background-color: #f0f0f0;
    color: #666;
}

.feedback-no:hover {
    background-color: #ffdddd !important;
    color: #cc0000;
}

.feedback-yes:hover {
    background-color: #ddffdd !important;
    color: #00aa00;
}

.feedback-btn svg {
    width: 18px;
    height: 18px;
}

body.dark-mode .feedback-no,
body.dark-mode .feedback-yes {
    background-color: #444;
    color: #ddd;
}

body.dark-mode .feedback-no:hover {
    background-color: #552222 !important;
    color: #ffaaaa;
}

body.dark-mode .feedback-yes:hover {
    background-color: #225522 !important;
    color: #aaffaa;
}

/* Thank you message after feedback */
.feedback-thanks {
    text-align: center;
    color: #0066cc;
    font-weight: 500;
    margin: 0;
    padding: 10px;
}

body.dark-mode .feedback-thanks {
    color: #3399ff;
}

/* Redeem button */
.redeem-btn-container {
    padding: 0 25px 25px;
    text-align: center;
}

.redeem-btn {
    display: block;
    width: 100%;
    background-color: #0066cc; /* Changed to blue to match theme */
    color: white;
    border: none;
    padding: 12px;
    border-radius: 6px;
    font-size: 16px;
    font-weight: 600;
    text-align: center;
    cursor: pointer;
    transition: background-color 0.3s ease;
    text-decoration: none;
}

.redeem-btn:hover {
    background-color: #0055aa !important;
    color: white;
    text-decoration: none;
}

/* Animation for copied message */
@keyframes fadeInOut {
    0% { opacity: 0; }
    20% { opacity: 1; }
    80% { opacity: 1; }
    100% { opacity: 0; }
}

.copy-animation {
    animation: fadeInOut 2s ease-in-out;
}

/* Dark mode support - general elements */
body.dark-mode {
    color: #f0f0f0;
    background-color: #1e1e1e;
}

body.dark-mode .dynamic-coupon {
    background-color: #2d2d2d;
    border-color: #3399ff;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
}

body.dark-mode .coupon-title {
    color: #f0f0f0;
}

body.dark-mode .coupon-left {
    border-right-color: #444;
}

body.dark-mode .coupon-right {
    border-left-color: #444;
}

body.dark-mode .coupon-usage {
    color: #aaa;
}

body.dark-mode .coupon-last-tried {
    color: #aaa;
}

body.dark-mode .title {
    color: #ccc;
}

body.dark-mode .vote-button {
    color: #aaa;
}

body.dark-mode .vote-button:not(:disabled):hover {
    background-color: #333;
}

body.dark-mode .feedback-message {
    color: #aaa;
}

body.dark-mode .d-center {
    background-color: #2d2d2d;
}

body.dark-mode .filter-section h4 {
    color: #f0f0f0;
}

body.dark-mode .filter-option {
    color: #ddd;
}

body.dark-mode .filter-options {
    scrollbar-color: #555 #333;
}

body.dark-mode .filter-button.reset {
    background-color: #4d5154;
}

body.dark-mode .filter-results-count {
    color: #aaa;
}

body.dark-mode .filter-loading {
    color: #aaa;
}

body.dark-mode .store-card {
    background-color: #2d3339;
    border-color: #ff547c;
}

body.dark-mode .store-card-name {
    color: #f0f0f0;
}

body.dark-mode .store-logo-placeholder {
    background-color: #3d4852;
    color: #f0f0f0;
}

/* Responsive popup styles */
@media (max-width: 576px) {
    .coupon-popup {
        width: 95%;
        max-width: 450px;
    }
    
    .popup-discount {
        font-size: 32px;
    }
    
    .popup-title {
        font-size: 18px;
    }
    
    .popup-code {
        font-size: 18px;
    }
    
    .popup-body {
        padding: 15px 20px;
    }
    
    .popup-store-header {
        padding: 20px 20px 15px;
    }
    
    .redeem-btn-container {
        padding: 0 20px 20px;
    }
}

/* Improved Expired coupon styling */
.dynamic-coupon.expired {
    position: relative;
    opacity: 0.85;
    pointer-events: none; /* Makes the coupon unclickable */
}

/* Replace the large diagonal label with a cleaner smaller one */
.dynamic-coupon.expired::before {
    content: "EXPIRED";
    position: absolute;
    top: 10px;
    right: 10px; /* Position in upper right corner instead of diagonal */
    background-color: #e74c3c;
    color: white;
    padding: 3px 10px;
    font-weight: 600;
    font-size: 12px;
    border-radius: 3px;
    z-index: 10;
    box-shadow: 0 1px 3px rgba(0,0,0,0.2);
}

/* Subtle grayscale effect */
.dynamic-coupon.expired .coupon-container {
    filter: grayscale(0.6); /* Less aggressive grayscale */
}

/* Also add an "Expired" label to replace the timer */
.dynamic-coupon.expired .coupon-right .coupon-timer {
    background-color: #e74c3c;
    color: white;
    padding: 5px 10px;
    border-radius: 4px;
    font-weight: 600;
    text-align: center;
}

/* Increase store title size */
.title-animation-underline,
.post-wrapper .title a {
    font-size: 22px !important;  /* Increase from 14px to 22px */
    font-weight: 700 !important;
    line-height: 1.3 !important;
    padding: 5px 0 !important;
    display: inline-block !important;
}

/* Make sure the title stands out with proper spacing */
h3.title {
    margin-bottom: 12px !important;
}

/* Fix for specific store layout */
.post-inner .content-inner .title a {
    font-size: 22px !important;
    color: #333 !important;
}

/* Add hover effect for better user experience */
.title-animation-underline:hover,
.post-wrapper .title a:hover {
    color: #0066cc !important;
}
/* Get Deal Button Styling - Pill Shape Design */
.deal-button-container {
    text-align: center;
    margin: 10px 0;
    width: 100%;
}

.get-deal-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    background-color: #1ca2fc;
    color: white;
    padding: 12px 25px;
    border-radius: 50px; /* Full rounded corners for pill shape */
    font-weight: 600;
    text-decoration: none;
    transition: all 0.3s ease;
    border: none;
    cursor: pointer;
    font-size: 16px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    width: auto;
    min-width: 220px; /* Ensure minimum width for proper appearance */
    max-width: 100%;
}

.get-deal-button:hover, 
.get-deal-button:focus {
    background-color: #2196f3;
    color: white !important;
    text-decoration: none !important;
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0,0,0,0.15);
}

.deal-button-text {
    font-weight: 600;
    font-size: 16px;
}

/* Specific iPad Air optimization */
@media only screen and (min-width: 768px) and (max-width: 834px) {
    .get-deal-button {
        min-width: 170px; /* Matches the width in the screenshot */
        padding: 8px 16px;
        font-size: 14px;
    }
    
    /* Adjust the icon size for this resolution */
    .deal-button-icon svg {
        width: 14px;
        height: 14px;
    }
}

@media only screen and (min-width: 1024px) and (max-width: 1112px) {
    .get-deal-button {
        min-width: 120px;
        max-width: 150px;
        width: 150px; /* Fixed width for iPad Pro */
        padding: 8px 15px;
    }
}

/* Responsive adjustments */
@media (max-width: 768px) {
    /* Tablet */
    .get-deal-button {
        padding: 10px 20px;
        font-size: 15px;
        min-width: 180px;
    }
}

@media (max-width: 480px) {
    /* Mobile */
    .get-deal-button {
        padding: 10px 18px;
        font-size: 14px;
        min-width: 100px;
        width: 65%; /* Take more width on very small screens */
    }
}

.redeem-btn.get-deal-button .deal-button-icon svg {
    position: relative;
    top: -1px; /* Same micro-adjustment for consistency */
}

/* For the popup Get Deal button */
.redeem-btn.get-deal-button {
    background-color: #1ca2fc;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    border-radius: 50px;
    padding: 12px 25px;
    width: 100%;
}

.redeem-btn.get-deal-button:hover, 
.redeem-btn.get-deal-button:focus {
    background-color: #2196f3 !important;
}

/* Optional dark mode support */
body.dark-mode .get-deal-button,
body.dark-mode .redeem-btn.get-deal-button {
    background-color: #1ca2fc;
}

body.dark-mode .get-deal-button:hover,
body.dark-mode .get-deal-button:focus,
body.dark-mode .redeem-btn.get-deal-button:hover,
body.dark-mode .redeem-btn.get-deal-button:focus {
    background-color: #2196f3 !important;
}

/* Enhanced styling for Get Deal button in popup */
.redeem-btn.get-deal-button {
    background-color: #1CA2FC;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.redeem-btn.get-deal-button:hover, 
.redeem-btn.get-deal-button:focus {
    background-color: #2196f3 !important;
}

/* Style for the no code required message */
.popup-instructions strong {
    color: #1CA2FC;
    font-weight: 600;
}

body.dark-mode .popup-instructions strong {
    color: #1ca2fc;
}

/* Fix for coupon button text overflow on iPad Pro and tablets */

/* Enhanced button overflow protection */
.cmn-btn.btn-overlay {
    overflow: hidden; /* Prevent text from leaking outside button */
    box-sizing: border-box;
}

.cmn-btn.btn-overlay .coupon-code {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    max-width: 100%;
    box-sizing: border-box;
    padding-right: 10px; /* Reduce padding to give more space for text */
}

/* Specific fix for iPad Pro (1024x1366) */
@media screen and (width: 1024px) and (height: 1366px) {
    .cmn-btn.btn-overlay {
        max-width: 200px; /* Reduce button width */
        font-size: 12px; /* Smaller font size */
    }
    
    .cmn-btn.btn-overlay .coupon-code {
        font-size: 12px !important; /* Force smaller font for coupon code */
        padding-right: 8px;
    }
    
    .cmn-btn.btn-overlay .show {
        font-size: 12px; /* Smaller "Show Coupon" text */
    }
}

/* General tablet adjustments */
@media screen and (min-width: 768px) and (max-width: 1024px) {
    .cmn-btn.btn-overlay {
        max-width: 210px;
        font-size: 13px;
    }
    
    .cmn-btn.btn-overlay .coupon-code {
        font-size: 13px !important;
        padding-right: 8px;
    }
    
    .cmn-btn.btn-overlay .show {
        font-size: 13px;
    }
}

/* Alternative approach - Allow text wrapping if you prefer */
.cmn-btn.btn-overlay.wrap-text .coupon-code {
    white-space: normal;
    word-break: break-word;
    line-height: 1.1;
    padding: 8px;
}

/* Ensure the button container maintains proper bounds */
.coupon-show-btn {
    max-width: 100%;
    overflow: hidden;
}




/* No-Expire Coupon Specific Styles */

/* No-expire badge styling */
.coupon-no-expire {
    background: linear-gradient(45deg, #ff6b6b, #4ecdc4);
    animation: gradient-shift 3s ease-in-out infinite;
}

@keyframes gradient-shift {
    0%, 100% {
        background: linear-gradient(45deg, #ff6b6b, #4ecdc4);
    }
    50% {
        background: linear-gradient(45deg, #4ecdc4, #45b7d1);
    }
}

/* No-expire timer styling - different from regular timers */
.coupon-timer.no-expire-timer {
    position: relative;
}

.coupon-timer.no-expire-timer::before {
    content: "";
    position: absolute;
    top: -2px;
    left: -2px;
    right: -2px;
    bottom: -2px;
    background: linear-gradient(45deg, #ff6b6b, #4ecdc4, #45b7d1, #96ceb4);
    background-size: 400% 400%;
    border-radius: 6px;
    z-index: -1;
    animation: gradient-border 4s ease infinite;
}

@keyframes gradient-border {
    0%, 100% {
        background-position: 0% 50%;
    }
    50% {
        background-position: 100% 50%;
    }
}

.coupon-timer.no-expire-timer .timer-block {
    background-color: #f5f5f5;
    position: relative;
    z-index: 1;
    border: 2px solid transparent;
    background-clip: padding-box;
}

/* No-expire coupon container enhancement */
.dynamic-coupon.no-expire-coupon {
    position: relative;
    overflow: hidden;
}

.dynamic-coupon.no-expire-coupon::after {
    content: "";
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(
        90deg,
        transparent,
        rgba(255, 255, 255, 0.1),
        transparent
    );
    animation: shimmer 3s infinite;
    pointer-events: none;
}

@keyframes shimmer {
    0% {
        left: -100%;
    }
    100% {
        left: 100%;
    }
}

/* Dark mode support for no-expire elements */
body.dark-mode .coupon-timer.no-expire-timer .timer-block {
    background-color: #f5f5f5;
    color: #333;
}

body.dark-mode .dynamic-coupon.no-expire-coupon::after {
    background: linear-gradient(
        90deg,
        transparent,
        rgba(255, 255, 255, 0.05),
        transparent
    );
}

/* Urgent timer styling for no-expire coupons when time is low */
.coupon-timer.no-expire-timer.timer-urgent .timer-block {
    animation: pulse-urgent 1s infinite;
    background-color: #ffebee;
    color: #d32f2f;
}

@keyframes pulse-urgent {
    0%, 100% {
        transform: scale(1);
        box-shadow: 0 0 0 0 rgba(244, 67, 54, 0.7);
    }
    50% {
        transform: scale(1.05);
        box-shadow: 0 0 0 5px rgba(244, 67, 54, 0);
    }
}

/* Special styling when timer is very low (under 1 hour) */
.coupon-timer.no-expire-timer.timer-critical .timer-block {
    background: linear-gradient(45deg, #f44336, #ff5722);
    color: white;
    animation: critical-flash 0.5s infinite alternate;
}

@keyframes critical-flash {
    0% {
        opacity: 0.8;
    }
    100% {
        opacity: 1;
    }
}

/* Admin meta box styling for no-expire section */
.no-expire-section {
    background: #f9f9f9;
    padding: 15px;
    border-radius: 5px;
    margin: 15px 0;
    border-left: 4px solid #2196f3;
    position: relative;
}

.no-expire-section::before {
    content: "⏰";
    position: absolute;
    top: 15px;
    right: 15px;
    font-size: 20px;
    opacity: 0.5;
}

.no-expire-info {
    font-size: 13px;
    color: #666;
    margin-top: 8px;
    font-style: italic;
    line-height: 1.4;
}

.expiry-fields {
    transition: opacity 0.3s ease;
}

.expiry-fields.disabled {
    opacity: 0.5;
    pointer-events: none;
}

.expiry-fields.disabled input {
    background-color: #f5f5f5;
    cursor: not-allowed;
}

/* Mobile responsive adjustments for no-expire elements */
@media (max-width: 768px) {
    .coupon-timer.no-expire-timer {
        gap: 3px;
    }
    
    .coupon-timer.no-expire-timer .timer-block {
        padding: 4px 5px;
        font-size: 12px;
    }
    
    .no-expire-section {
        padding: 12px;
        margin: 10px 0;
    }
    
    .no-expire-info {
        font-size: 12px;
    }
}

/* ============= CLEAN FIXED REVIEW STYLES - REPLACE ALL OLD CSS ============= */

/* Header stars styling */
.header-star {
    width: 18px;
    height: 18px;
    color: #e0e0e0;
    margin-right: 2px;
    transition: color 0.2s ease;
}

.header-star.filled {
    color: #ffb900;
}

/* Rating stars container */
.rating-stars {
    display: flex;
    align-items: center;
    gap: 2px;
}

/* Review item base styling */
.review-item {
    border: 1px solid #eee;
    border-radius: 8px;
    padding: 20px;
    margin-bottom: 20px;
    background-color: #fff;
    transition: all 0.3s ease;
}

.review-item:hover {
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

/* Reviewer info layout */
.reviewer-info {
    display: flex;
    align-items: flex-start;
    gap: 15px;
}

.reviewer-avatar {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background-color: #0066cc;
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    font-size: 18px;
    flex-shrink: 0;
}

.reviewer-details {
    flex: 1;
    min-width: 0;
}

/* FIXED: Reviewer top row - name and pin side by side */
.reviewer-top-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 8px;
    width: 100%;
}

.reviewer-name {
    font-size: 16px;
    font-weight: 600;
    color: #333;
    margin: 0;
    flex-grow: 1;
}

/* FIXED: Right-side pinned badge with correct icon */
.pinned-badge-new {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    background: linear-gradient(45deg, #ff6b35, #f7931e);
    color: white;
    font-size: 10px;
    font-weight: 600;
    padding: 3px 8px;
    border-radius: 12px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.2);
    flex-shrink: 0;
    margin-left: 10px;
}

/* FIXED: Pushpin icon styling */
.pushpin-icon {
    width: 12px;
    height: 12px;
    color: white;
}

/* FIXED: Pinned review item styling */
.pinned-review-item {
    border: 2px solid #ff6b35;
    background: linear-gradient(135deg, #fff8f5 0%, #ffffff 100%);
    position: relative;
    border-radius: 8px;
}

.pinned-review-item::before {
    content: "";
    position: absolute;
    top: -6px;
    right: -6px;
    background: #ff6b35;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    box-shadow: 0 2px 4px rgba(0,0,0,0.2);
}

.pinned-review-item::after {
    content: "📌";
    position: absolute;
    top: -4px;
    right: -4px;
    font-size: 8px;
    z-index: 1;
}

/* Review meta styling */
.review-meta {
    display: flex;
    align-items: center;
    gap: 10px;
}

/* FIXED: SVG Star styling for review ratings */
.star-svg {
    width: 14px;
    height: 14px;
    color: #e0e0e0;
    margin-right: 1px;
    transition: color 0.2s ease;
}

.star-svg.filled {
    color: #ffb900;
}

/* Rating section styling */
.review-rating {
    display: flex;
    align-items: center;
    gap: 1px;
    margin-right: 15px;
}

.review-date {
    font-size: 13px;
    color: #666;
}

/* Review content */
.review-content {
    margin-top: 15px;
}

.review-content p {
    margin: 0;
    line-height: 1.6;
    color: #333;
}

/* FIXED: Form rating input with SVG stars */
.rating-input-svg {
    display: flex;
    flex-direction: row-reverse;
    justify-content: flex-end;
    gap: 5px;
    margin: 10px 0;
}

.rating-input-svg input {
    display: none;
}

.star-label-svg {
    cursor: pointer;
    transition: all 0.2s ease;
    margin: 0;
    padding: 2px;
    border: none;
    background: none;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 4px;
}

.star-label-svg:hover {
    background-color: rgba(255, 185, 0, 0.1);
}

.star-label-svg svg {
    width: 28px;
    height: 28px;
    color: #e0e0e0;
    transition: color 0.2s ease;
}

/* Star rating interaction effects */
.rating-input-svg input:checked ~ .star-label-svg svg,
.star-label-svg:hover svg,
.star-label-svg:hover ~ .star-label-svg svg {
    color: #ffb900;
}

/* Selected state for stars */
.star-label-svg.selected svg {
    color: #ffb900;
}

/* Load more button */
.load-more-container {
    text-align: center;
    margin-top: 20px;
    padding-top: 20px;
    border-top: 1px solid #eee;
}

.load-more-btn {
    background-color: #f8f9fa;
    border: 2px solid #0066cc;
    color: #0066cc;
    padding: 12px 30px;
    border-radius: 25px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.load-more-btn:hover {
    background-color: #0066cc;
    color: white;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 102, 204, 0.3);
}

.load-more-btn:disabled {
    background-color: #e9ecef;
    border-color: #ced4da;
    color: #6c757d;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

/* Admin pinned review styles */
.pinned-review { 
    background-color: #fff3cd; 
    border-left: 4px solid #ffc107; 
}

.pinned-indicator { 
    color: #856404; 
    font-weight: bold; 
}

.not-pinned { 
    color: #ccc; 
}

.pin-review, .unpin-review { 
    margin-bottom: 5px; 
}

/* Dark mode support */
body.dark-mode .review-item {
    background-color: #3d4852;
    border-color: #555;
}

body.dark-mode .reviewer-name {
    color: #f0f0f0;
}

body.dark-mode .pinned-badge-new {
    background: linear-gradient(45deg, #ff6b35, #f7931e);
    color: white;
}

body.dark-mode .pushpin-icon {
    color: white;
}

body.dark-mode .pinned-review-item {
    border-color: #ff6b35;
    background: linear-gradient(135deg, #161312 0%, #2d3339 100%);
}

body.dark-mode .star-svg,
body.dark-mode .header-star {
    color: #555;
}

body.dark-mode .star-svg.filled,
body.dark-mode .header-star.filled {
    color: #ffb900;
}

body.dark-mode .star-label-svg svg {
    color: #555;
}

body.dark-mode .star-label-svg:hover {
    background-color: rgba(255, 185, 0, 0.2);
}

body.dark-mode .rating-input-svg input:checked ~ .star-label-svg svg,
body.dark-mode .star-label-svg:hover svg,
body.dark-mode .star-label-svg:hover ~ .star-label-svg svg {
    color: #ffb900;
}

body.dark-mode .review-date {
    color: #aaa;
}

body.dark-mode .review-content p {
    color: #e0e0e0;
}

body.dark-mode .load-more-container {
    border-top-color: #444;
}

body.dark-mode .load-more-btn {
    background-color: #3d4852;
    border-color: #3399ff;
    color: #3399ff;
}

body.dark-mode .load-more-btn:hover {
    background-color: #3399ff;
    color: white;
}

body.dark-mode .load-more-btn:disabled {
    background-color: #2d3339;
    border-color: #555;
    color: #aaa;
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .reviewer-top-row {
        flex-direction: column;
        align-items: flex-start;
        gap: 5px;
    }
    
    .pinned-badge-new {
        font-size: 9px;
        padding: 2px 6px;
        margin-left: 0;
        align-self: flex-start;
    }
    
    .pushpin-icon {
        width: 10px;
        height: 10px;
    }
    
    .star-svg,
    .header-star {
        width: 12px;
        height: 12px;
    }
    
    .star-label-svg svg {
        width: 24px;
        height: 24px;
    }
    
    .review-meta {
        flex-direction: column;
        align-items: flex-start;
        gap: 5px;
    }
    
    .load-more-btn {
        padding: 10px 20px;
        font-size: 14px;
    }
}

@media (max-width: 480px) {
    .pinned-badge-new {
        font-size: 8px;
        padding: 2px 5px;
    }
    
    .rating-input-svg {
        gap: 3px;
    }
    
    .star-label-svg svg {
        width: 22px;
        height: 22px;
    }
    
    .load-more-btn {
        width: 100%;
        max-width: 300px;
        padding: 10px 20px;
        font-size: 14px;
    }
}

/* IMPORTANT: Hide all old conflicting styles */
.pinned-badge,
.pinned-badge-right,
.reviewer-name-row {
    display: none !important;
}

/* Remove any old pin styling conflicts */
.review-item:has(.pinned-badge),
.review-item:has(.pinned-badge-right) {
    border: 1px solid #eee !important;
    background: #fff !important;
}