/**
 * Styles for the Promo Code feature
 */

/* General Widget Enhancements */
.promo-code-widget {
    margin-bottom: 40px; /* Increased bottom margin */
    font-family: 'Inter', sans-serif; /* Modern sans-serif font */
    color: #333; /* Darker base text color for better readability */
}

.promo-code-widget .jumbotron {
    background-color: #f8f9fa; /* Lighter jumbotron background */
    padding: 2rem 2rem; /* Adjusted padding */
    margin-bottom: 30px;
    border-radius: 8px;
}

.promo-code-widget .jumbotron h1 {
    font-size: 2.5rem; /* Slightly reduced font size */
    font-weight: 600;
    color: #2c3e50; /* Darker, more professional heading color */
}

.promo-code-widget .jumbotron .lead {
    font-size: 1.1rem; /* Adjusted lead text size */
    color: #555;
    margin-bottom: 0;
}

/* Promo form styling */
.promo-code-form {
    margin-bottom: 30px; /* Increased margin */
    padding-left: 15px; /* Align with col padding */
    padding-right: 15px; /* Align with col padding */
}

.promo-code-form .input-group {
    margin-bottom: 15px;
    width: 100%;
}

.promo-code-form input[type="text"] {
    border-radius: 8px;
    height: 60px;
    font-size: 1.5rem;
    border: 1px solid #ced4da;
    padding: 0.75rem 1rem;
    box-shadow: 0 2px 5px rgba(0,0,0,0.05);
    width: 100%;
    margin-bottom: 15px;
}

.promo-code-form input[type="text"]:focus {
    outline: none;
    border-color: #28a745;
    box-shadow: 0 0 0 0.2rem rgba(40,167,69,.25);
}

.promo-code-form button {
    border-radius: 8px;
    height: 60px;
    font-size: 1.2rem;
    font-weight: 600;
    padding: 0.75rem 1.5rem;
    background-color: #28a745;
    border: 1px solid #28a745;
    color: white;
    transition: background-color 0.15s ease-in-out, border-color 0.15s ease-in-out, transform 0.1s ease;
    width: 100%;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
}

.promo-code-form button:hover {
    background-color: #218838;
    border-color: #1e7e34;
    transform: translateY(-1px);
}

.promo-code-form .help-text {
    margin-top: 15px;
}

.promo-code-form button.loading {
    opacity: 0.7;
    cursor: wait;
    background-color: #0056b3;
}

/* Results container & Messages */
.promo-code-results {
    margin-top: 25px;
    min-height: 50px;
    position: relative;
    padding: 15px; /* This padding might be for the overall results area, not the card */
    border-radius: 8px;
    font-size: 0.95rem;
}

.promo-code-results .alert {
    padding: 15px;
    margin-left: 15px;
    margin-right: 15px;
    margin-bottom: 20px;
    border: 1px solid transparent;
    border-radius: 8px;
}

.promo-code-results .alert-success {
    color: #155724;
    background-color: #d4edda;
    border-color: #c3e6cb;
}

.promo-code-results .alert-danger {
    color: #721c24;
    background-color: #f8d7da;
    border-color: #f5c6cb;
}

.promo-code-results .alert-info {
    color: #0c5460;
    background-color: #d1ecf1;
    border-color: #bee5eb;
}

.promo-code-results.loading:after {
    content: "Loading...";
    display: flex;
    align-items: center;
    justify-content: center;
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: rgba(255, 255, 255, 0.85);
    text-align: center;
    font-size: 1.1rem;
    color: #333;
    border-radius: 8px;
}

/* General Section Title Styling (used for "Reward Details" and "Applicable Offers") */
.promo-section-title {
    font-size: 1.5rem; /* Consistent with other h4s like .promo-code-widget h4 */
    font-weight: 600;
    color: #2c3e50;
    margin-top: 30px; /* Space above the title */
    margin-bottom: 15px; /* Space between title and the card/content below */
    padding-bottom: 10px;
    border-bottom: 1px solid #eee;
    /* If this title should align with .promo-code-form, ensure consistent padding/margin context */
    /* For example, if .promo-code-form has padding-left: 15px, this might need it too, or its container. */
    /* padding-left: 15px; /* Optional: if alignment with padded form elements is desired */
    /* padding-right: 15px; /* Optional: if alignment with padded form elements is desired */
}

/* NEW Reward Card Styling */
.reward-card {
    background-color: #ffffff;
    border-radius: 12px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.08);
    margin-bottom: 30px;
    overflow: hidden;
    position: relative;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    border: 1px solid rgba(0, 0, 0, 0.1);
}

.reward-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.12);
}

.reward-header {
    background-color: #f8f9fa;
    padding: 20px;
    border-bottom: 1px solid #e9ecef;
    position: relative;
    text-align: left;
}

.reward-code-corner {
    position: absolute;
    top: 15px;
    right: 15px;
    color: #007bff;
    display: flex;
    align-items: center;
    justify-content: flex-end;
}

.code-value {
    font-weight: 700;
    color: #007bff;
    font-size: 1.4rem;
    letter-spacing: 0.5px;
}

.reward-promotion-title {
    font-size: 1.4rem;
    font-weight: 600;
    color: #2c3e50;
    margin: 0;
    padding: 0;
    text-align: left;
    padding-right: 100px; /* Space for the code on the right */
}

.text-left {
    text-align: left !important;
}

.reward-body {
    padding: 20px;
}

.reward-benefits {
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
    margin-bottom: 20px;
}

.reward-item {
    flex: 1;
    min-width: 120px;
    background-color: #f8f9fa;
    border-radius: 10px;
    padding: 15px;
    transition: transform 0.2s ease;
    border: 1px solid #e9ecef;
}

.reward-item:hover {
    transform: translateY(-3px);
}

.reward-item.discount {
    border-left: 4px solid #28a745;
}

.reward-item.hours {
    border-left: 4px solid #17a2b8;
}

.reward-icon {
    width: 40px;
    height: 40px;
    background-color: #ffffff;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 15px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    float: left;
    margin-right: 15px;
}

.reward-item.discount .reward-icon i {
    color: #28a745;
}

.reward-item.hours .reward-icon i {
    color: #17a2b8;
}

.reward-content {
    overflow: hidden;
}

.reward-value {
    font-size: 1.3rem;
    font-weight: 700;
    line-height: 1.2;
}

.reward-item.discount .reward-value {
    color: #28a745;
}

.reward-item.hours .reward-value {
    color: #17a2b8;
}

.reward-label {
    font-size: 0.85rem;
    color: #6c757d;
    font-weight: 500;
    margin-bottom: 8px;
}

.reward-description {
    font-size: 0.9rem;
    color: #495057;
    margin-top: 8px;
    line-height: 1.4;
}

.reward-validity {
    border-top: 1px solid #eee;
    padding-top: 15px;
    color: #6c757d;
    font-size: 0.9rem;
    display: flex;
    align-items: center;
}

.reward-validity i {
    margin-right: 8px;
    color: #6c757d;
}

/* DEPRECATED: Old Promo Code Details Card styles kept for reference */
.promo-code-details.card {
    border-color: #e9ecef;
    box-shadow: 0 2px 8px rgba(0,0,0,0.06);
    margin-left: 0;
    margin-right: 0;
    margin-bottom: 30px;
}

.promo-details-body.card-body {
    padding: 0.75rem 1.25rem;
}

.promo-rewards-list {
    list-style: none;
    padding-left: 0;
    margin-bottom: 0;
}

.promo-rewards-list li {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.6rem 0; 
    border-bottom: 1px solid #f1f3f5;
}

.promo-rewards-list.compact-list li {
    padding-top: 0.5rem;
    padding-bottom: 0.5rem;
}
.promo-rewards-list.compact-list .promo-reward-label,
.promo-rewards-list.compact-list .promo-reward-value {
    font-size: 0.9rem;
}

.promo-rewards-list li:last-child {
    border-bottom: none;
}

.promo-reward-label {
    font-size: 0.95rem;
    color: #495057;
    font-weight: 500;
    padding-right: 10px;
}

.promo-reward-value {
    font-size: 1.05rem;
    color: #212529;
    font-weight: 600;
    text-align: right;
    flex-shrink: 0;
}

.promo-reward-value.highlight-value {
    color: #007bff;
    font-size: 1.1rem;
}
.promo-rewards-list.compact-list .promo-reward-value.highlight-value {
    font-size: 1rem;
}


.promo-reward-value.success-value {
    color: #28a745;
}

.promo-reward-value.info-value {
    color: #17a2b8;
}

.promo-reward-value.muted-value {
    color: #6c757d;
    font-weight: 500;
}

/* Styling for "This code can be used with the following offers:" title */
/* This selector was .promo-applicable-offers > h4. Let's make it consistent: */
.promo-applicable-offers .promo-section-title {
    /* Inherits from .promo-section-title, specific overrides can go here if needed */
    /* For example, if it needs different margins than the "Reward Details" title */
    margin-top: 40px; /* More space before applicable offers */
}


/* Offer boxes */
.promo-offer-box.card {
    border: 1px solid #dee2e6;
    border-radius: 10px;
    background: #ffffff;
    box-shadow: 0 4px 12px rgba(0,0,0,0.08);
    transition: all 0.25s ease-in-out;
    display: flex;
    flex-direction: column;
}

.promo-offer-box.card:hover {
    box-shadow: 0 8px 20px rgba(0,0,0,0.12);
    border-color: #007bff;
    transform: translateY(-3px);
}

.promo-offer-box .offer-logo-wrapper {
    min-height: 70px;
}

.promo-offer-box .promo-offer-logo {
    max-width: 60px;
    max-height: 60px;
    border-radius: 8px;
    border: 1px solid #eee;
    object-fit: contain;
}

.promo-offer-box .card-body {
    padding: 1.25rem;
    flex-grow: 1;
}

.promo-offer-box .offer-name {
    font-weight: 600;
    font-size: 1.15rem;
    color: #007bff;
    margin-bottom: 0.25rem;
}

.promo-offer-box .offer-label {
    font-size: 0.85rem;
    display: block;
    margin-bottom: 0.75rem;
}

.promo-offer-box .offer-description {
    color: #495057;
    font-size: 0.9rem;
    line-height: 1.5;
    margin-bottom: 1rem;
}

.promo-offer-box .offer-details {
    font-size: 0.85rem;
    color: #555;
    padding-left: 0;
    list-style: none;
}

.promo-offer-box .offer-details li {
    margin-bottom: 0.5rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
}

.promo-offer-box .offer-details li strong {
    color: #333;
}

.promo-offer-box .card-footer.price-section {
    background-color: #f8f9fa;
    border-top: 1px solid #e9ecef;
    padding: 0.75rem 1.25rem;
}

.promo-offer-box .original-price {
    text-decoration: line-through;
    color: #6c757d;
    font-size: 0.9rem;
}

.promo-offer-box .discounted-price {
    color: #28a745;
    font-weight: 700;
    font-size: 1.35rem;
}

/* Fallback section */
.promo-code-fallback {
    margin-top: 40px;
    padding: 25px;
    background-color: #f1f3f5;
    border-radius: 8px;
    text-align: center;
    border: 1px dashed #ced4da;
}

.promo-code-fallback h5 {
    font-size: 1.2rem;
    color: #495057;
    margin-bottom: 15px;
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .promo-code-widget .jumbotron h1 {
        font-size: 2rem;
    }
    .promo-code-form input[type="text"] {
        font-size: 1.2rem;
        height: 55px;
        margin-bottom: 10px;
    }
    .promo-code-form button {
        font-size: 1.1rem;
        height: 55px;
    }
    .promo-offer-box .price-section {
        text-align: right;
    }
    .promo-offer-box .original-price,
    .promo-offer-box .discounted-price {
        display: inline-block;
    }
     .promo-offer-box.card .card-title {
        font-size: 1.1rem;
    }
    .promo-section-title {
        font-size: 1.3rem; /* Adjust section title for smaller screens */
    }
    
    /* Responsive styling for new reward card */
    .reward-benefits {
        flex-direction: column;
        gap: 10px;
    }
    
    .reward-item {
        min-width: 100%;
    }
    
    .reward-promotion-title {
        font-size: 1.2rem;
        margin-top: 10px;
        padding-right: 0;
    }
    
    .reward-code-corner {
        position: relative;
        top: 0;
        right: 0;
        margin-bottom: 15px;
        justify-content: center;
        text-align: center;
        width: 100%;
    }
    
    .code-value {
        font-size: 1.3rem;
    }
    
    .reward-value {
        font-size: 1.2rem;
    }
    
    .reward-description {
        font-size: 0.85rem;
    }
}

/* Add Inter font from Google Fonts if not already available */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700&display=swap');