/* Common Styles */
html {
    scroll-behavior: smooth;
}

body {
    font-family: Arial, sans-serif;
    background-color: #f0f2f5;
    margin: 0;
    padding: 20px;
}

.container {
    margin: 0 auto;
    background-color: #fff;
    padding: 20px;
    box-shadow: 0 0 10px rgba(0, 0, 0, 0.1);
    border-radius: 8px;
}

h1 {
    text-align: center;
    color: #333;
}

/* ==========================================================================
   Deals Calendar Page Styles
   ========================================================================== */

.calendar-container {
    max-width: 1200px;
}

.calendar-container h1 {
    margin-bottom: 20px;
}

.calendar-grid {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 10px;
}

.day-header {
    font-weight: bold;
    text-align: center;
    background: #f8f9fa;
    color: #333;
    border: 1px solid #dadada;
    padding: 10px;
    border-radius: 4px;
}

.calendar-day {
    background: #f8f9fa;
    border: 1px solid #dadada;
    border-radius: 4px;
    min-height: 150px;
    padding: 5px;
    display: flex;
    flex-direction: column;
}

.calendar-day.today {
    background: #fff;
    border: 2px solid #5cb85c;
}

.date-number {
    font-size: 1.2em;
    font-weight: bold;
    color: #777;
    margin-bottom: 10px;
    text-align: right;
}

.mobile-day-name {
    display: none;
}

.deal-card {
    background: #fff;
    border: 1px solid #dadada;
    padding: 8px;
    margin-bottom: 8px;
    border-radius: 4px;
    font-size: 0.85em;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
}

.deal-card.live-now {
    background-color: #fffacd;
    border-color: #e6db55;
}

.deal-card .deal-franchise {
    font-weight: bold;
    color: #0056b3;
    margin-bottom: 3px;
    display: block;
    text-decoration: none;
}

.deal-card .deal-franchise:hover {
    text-decoration: underline;
}

.deal-card .deal-title {
    color: #333;
    font-weight: bold;
    margin-bottom: 3px;
}

.deal-card .deal-description {
    color: #555;
    margin-bottom: 4px;
    line-height: 1.3;
}

.deal-card .deal-instructions {
    font-style: italic;
    color: #666;
    font-size: 0.9em;
    margin-bottom: 4px;
    line-height: 1.3;
}

.deal-card .deal-time {
    color: #28a745;
    font-weight: bold;
    font-size: 0.9em;
}

.jump-to-today {
    display: none;
    position: fixed;
    bottom: 20px;
    right: 20px;
    background-color: #0056b3;
    color: white;
    padding: 10px 15px;
    border-radius: 30px;
    text-decoration: none;
    font-weight: bold;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.3);
    z-index: 100;
}

#refresh-message {
    text-align: center;
    color: #888;
    font-size: 0.9em;
    margin: -10px 0 10px 0;
}

@media (max-width: 900px) {
    .calendar-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .day-header {
        display: none;
    }

    .jump-to-today {
        display: block;
    }

    .mobile-day-name {
        display: inline;
        margin-right: 4px;
    }

    .date-number {
        text-align: left;
    }
}

@media (max-width: 500px) {
    .calendar-grid {
        grid-template-columns: 1fr;
    }
}

/* ==========================================================================
   Deals List Page Styles
   ========================================================================== */

.deals-container {
    max-width: 900px;
    position: relative;
}

.deal-item {
    display: flex;
    border-bottom: 1px solid #dadada;
    padding: 20px 0;
}

.deal-item:last-child {
    border-bottom: none;
}

.deal-item.not-live {
    background-color: #eee;
    padding: 20px;
    border-radius: 0px;
    border-bottom: 1px solid #ccc;
    padding-bottom: 15px;
}

.deal-image {
    flex-shrink: 0;
    width: 120px;
    height: 120px;
    margin-right: 20px;
}

.deal-image img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    padding: 4px;
    border: 1px solid #ddd;
    border-radius: 4px;
}

.deal-content {
    flex-grow: 1;
}

.deal-item .deal-franchise {
    font-size: 1.2em;
    font-weight: bold;
    color: #0056b3;
}

.deal-item .deal-title {
    font-size: 1.1em;
    font-weight: bold;
    margin: 5px 0;
}

.deal-item .deal-description {
    color: #555;
    margin-bottom: 10px;
    line-height: 1.3;
}

.deal-item .deal-instructions {
    font-style: italic;
    color: #666;
    font-size: 0.9em;
}

.deal-meta {
    font-size: 0.9em;
    margin: 5px 0;
}

.deal-details {
    font-size: 0.9em;
    color: #777;
    margin-top: 10px;
}

.deal-details .discount {
    font-weight: bold;
    color: #d9534f;
    font-size: 1.1em;
}

.deal-details .expiry {
    margin-left: 15px;
}

.deal-link {
    display: inline-block;
    margin-top: 10px;
    padding: 8px 15px;
    background-color: #5cb85c;
    color: white;
    text-decoration: none;
    border-radius: 4px;
}

.deal-link:hover {
    background-color: #4cae4c;
}

.coupon-code {
    margin-top: 10px;
}

.coupon-code span {
    background-color: #f9f2f4;
    color: #c7254e;
    padding: 5px 8px;
    border-radius: 4px;
    font-family: monospace;
    font-size: 1.15em;
    font-weight: bold;
}

.copy-code-btn {
    margin-left: 10px;
    font-size: 0.9em;
    color: #007bff;
    text-decoration: none;
    cursor: pointer;
}

.copy-code-btn:hover {
    text-decoration: underline;
}

.fb-modal-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.6);
    z-index: 9999;
    align-items: center;
    justify-content: center;
}

.fb-modal {
    background: #fff;
    padding: 30px 15px 15px 15px;
    border-radius: 8px;
    position: relative;
    width: 350px;
    max-width: 90%;
    max-height: 90%;
    overflow: auto;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
}

.fb-modal-close {
    position: absolute;
    top: 5px;
    right: 10px;
    cursor: pointer;
    font-weight: bold;
    font-size: 24px;
    border: none;
    background: transparent;
    color: #333;
}