/* ProCalend - Production Calendar Styles */

:root {
    --color-workday: #212529;
    --color-weekend: #e91e8a;
    --color-holiday: #dc3545;
    --color-short: #0d6efd;
    --color-transferred: #6f42c1;
    --color-today-bg: #fff3cd;
}

/* Chrome Extension Button */
.btn-chrome-extension {
    background: linear-gradient(135deg, #ef4444 0%, #dc3545 100%);
    color: #fff;
    border: none;
    padding: 0.375rem 0.75rem;
    border-radius: 0.375rem;
    font-size: 0.875rem;
    font-weight: 500;
    text-decoration: none;
    transition: box-shadow 0.2s ease, background 0.2s ease;
}

.btn-chrome-extension.large {
    font-size: 1.875rem;
}

.btn-chrome-extension:hover {
    background: linear-gradient(135deg, #dc3545 0%, #b91c1c 100%);
    color: #fff;
    box-shadow: 0 4px 12px rgba(220, 53, 69, 0.4);
}

.btn-chrome-extension:active {
    box-shadow: 0 2px 4px rgba(220, 53, 69, 0.3);
}

/* General */
body {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

main {
    flex: 1;
}

/* Calendar Header */
.calendar-header {
    margin-bottom: 2rem;
}

/* Legend */
.legend {
    padding: 1rem;
    background: #f8f9fa;
    border-radius: 0.5rem;
    margin-top: 1.5rem;
    margin-bottom: 1.5rem;
}

.legend-color {
    display: inline-block;
    width: 20px;
    height: 20px;
    border-radius: 4px;
    border: 1px solid #dee2e6;
}

.legend-workday {
    background-color: #fff;
    position: relative;
}

.legend-workday::after {
    content: "1";
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    color: var(--color-workday);
    font-weight: bold;
    font-size: 12px;
}
.legend-weekend {
    background-color: #fff;
    position: relative;
}

.legend-weekend::after {
    content: "6";
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    color: var(--color-weekend);
    font-weight: bold;
    font-size: 12px;
}

.legend-holiday {
    background-color: #fff;
    position: relative;
}

.legend-holiday::after {
    content: "1";
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    color: var(--color-holiday);
    font-weight: bold;
    font-size: 12px;
}

.legend-short {
    background-color: #fff;
    position: relative;
}

.legend-short::after {
    content: "8";
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    color: var(--color-short);
    font-weight: bold;
    font-size: 12px;
}

.legend-transferred {
    background-color: #fff;
    position: relative;
}

.legend-transferred::after {
    content: "7";
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    color: var(--color-transferred);
    font-weight: bold;
    font-size: 12px;
}

.legend-transferred-short {
    background-color: #fff;
    position: relative;
}

.legend-transferred-short::after {
    content: "1*";
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    color: var(--color-transferred);
    font-weight: bold;
    font-size: 10px;
}

/* Month Cards */
.month-card {
    transition: box-shadow 0.2s ease;
}

.month-card:hover {
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

/* Month Header */
.month-header {
    background: linear-gradient(135deg, #64b5f6 0%, #2196f3 100%) !important;
}

/* Calendar Table */
.calendar-table {
    table-layout: fixed;
    font-size: 0.875rem;
    margin: 0;
}

.calendar-table thead {
    background-color: #f5f5f5;
}

.calendar-table th {
    padding: 0.5rem 0.25rem;
    font-weight: 600;
    font-size: 0.75rem;
    color: #6c757d;
    background-color: #f5f5f5;
    border: none;
}

.calendar-table th.week-number-header {
    background-color: #f5f5f5;
    font-weight: 700;
    color: #495057;
    width: 2.5rem;
}

.calendar-table td.week-number-cell {
    background-color: #fafafa;
    font-weight: 600;
    color: #6c757d;
    font-size: 0.7rem;
    padding: 0.35rem 0.25rem;
}

.calendar-table td {
    padding: 0.35rem 0.25rem;
    cursor: default;
}

.calendar-table tbody td:first-child {
    padding-left: 0.5rem;
}

.calendar-table thead th:first-child {
    padding-left: 0.5rem;
}

.text-weekend-header {
    color: var(--color-weekend) !important;
}

/* Day Types */
.day-cell {
    border-radius: 4px;
    transition: background-color 0.15s ease;
}

.day-cell:hover {
    background-color: #f0f0f0;
}

.day-workday {
    color: var(--color-workday);
}

.day-weekend {
    color: var(--color-weekend);
    font-weight: 500;
}

.day-holiday {
    color: var(--color-holiday);
    font-weight: 700;
}

.day-short {
    color: var(--color-short);
    font-weight: 500;
}

.day-short::after {
    content: "*";
    font-size: 0.6em;
    vertical-align: super;
}

.day-transferred {
    color: var(--color-transferred);
    font-weight: 500;
}

.day-transferred-short {
    color: var(--color-transferred);
    font-weight: 500;
}

.day-transferred-short::after {
    content: "*";
    font-size: 0.6em;
    vertical-align: super;
}

/* Tooltip customization */
[data-bs-toggle="tooltip"] {
    cursor: help;
    text-decoration: underline;
    text-decoration-style: dotted;
    text-underline-offset: 2px;
}

/* Quarter Layout */
.quarter-block {
    margin-bottom: 2rem;
}

.quarter-label-col {
    width: 80px;
    min-width: 80px;
}

.quarter-label {
    text-align: center;
    color: #6c757d;
}

.quarter-number {
    display: block;
    font-size: 1.5rem;
    font-weight: 700;
    color: #495057;
}

.quarter-text {
    display: block;
    font-size: 0.75rem;
    font-weight: 600;
    letter-spacing: 0.05em;
}

.quarter-months {
    flex-wrap: nowrap;
}

/* Quarter Statistics Table */
.quarter-stats {
    margin-top: 0.5rem;
}

.stats-table {
    width: 100%;
    font-size: 0.8rem;
    color: #6c757d;
    border-collapse: collapse;
    table-layout: fixed;
}

.stats-table td {
    padding: 0.15rem 0.5rem;
    vertical-align: middle;
}

.stats-section-header td {
    padding-top: 0.5rem;
    color: #495057;
}

.stats-label {
    text-align: left;
    white-space: nowrap;
    width: 90px;
}

.stats-value {
    text-align: center;
    width: calc((100% - 90px) / 4);
}

.stats-value.stats-quarter {
    font-weight: 600;
    color: #495057;
}

/* Statistics (legacy) */
.stat-card {
    transition: transform 0.2s ease;
}

.stat-card:hover {
    transform: scale(1.02);
}

.text-weekend {
    color: var(--color-weekend) !important;
}

.text-holiday {
    color: var(--color-holiday) !important;
}

/* Responsive */
@media (max-width: 991.98px) {
    .quarter-label-col {
        width: 60px;
        min-width: 60px;
    }
    
    .quarter-number {
        font-size: 1.2rem;
    }
    
    .quarter-text {
        font-size: 0.65rem;
    }
    
    .calendar-table {
        font-size: 0.7rem;
    }
    
    .calendar-table th,
    .calendar-table td {
        padding: 0.25rem 0.1rem;
        white-space: nowrap;
    }
    
    .calendar-table th {
        font-size: 0.65rem;
    }
    
    .calendar-table th.week-number-header {
        width: 1.8rem;
    }
    
    .calendar-table td.week-number-cell {
        font-size: 0.6rem;
        padding: 0.25rem 0.1rem;
    }
    
    .month-header h5 {
        font-size: 0.9rem;
    }
}

@media (max-width: 767.98px) {
    .quarter-block > .row {
        flex-direction: column;
    }
    
    .quarter-label-col {
        width: 100%;
        min-width: 100%;
        margin-bottom: 0.5rem;
    }
    
    .quarter-label {
        display: flex;
        align-items: center;
        justify-content: center;
        gap: 0.5rem;
    }
    
    .quarter-number {
        display: inline;
        font-size: 1.2rem;
    }
    
    .quarter-text {
        display: inline;
        font-size: 0.9rem;
    }
    
    .quarter-months {
        flex-wrap: wrap;
    }
    
    .quarter-months > .col-12 {
        margin-bottom: 0.75rem;
    }
    
    .stats-table {
        font-size: 0.75rem;
    }
    
    .stats-label {
        width: 80px;
    }
}

@media (max-width: 576px) {
    .calendar-table {
        font-size: 0.8rem;
    }
    
    .calendar-table th,
    .calendar-table td {
        padding: 0.2rem;
    }
    
    .stat-number {
        font-size: 1.5rem !important;
    }
    
    .stats-table {
        font-size: 0.7rem;
    }
    
    .stats-label {
        width: 70px;
    }
    
    .stats-table td {
        padding: 0.1rem 0.25rem;
    }
}

/* Print styles */
@media print {
    .navbar,
    footer,
    .sticky-promo-bar,
    .exit-popup-overlay {
        display: none !important;
    }
    
    .month-card {
        break-inside: avoid;
    }
    
    .card {
        border: 1px solid #000 !important;
    }
}

/* =====================================================
   PROMO ELEMENTS - Sticky Bar & Exit Intent Popup
   ===================================================== */

/* Sticky Promo Bar */
.sticky-promo-bar {
    position: sticky;
    top: 0;
    z-index: 1040;
    background: linear-gradient(135deg, #e3f2fd 0%, #bbdefb 100%);
    border-bottom: 1px solid #90caf9;
    box-shadow: 0 2px 8px rgba(33, 150, 243, 0.15);
}

.sticky-promo-bar.hidden {
    display: none !important;
}

.sticky-promo-text {
    color: #1565c0;
    font-weight: 500;
    font-size: 0.95rem;
}

.btn-chrome-promo {
    background: linear-gradient(135deg, #1976d2 0%, #1565c0 100%);
    color: #fff;
    border: none;
    padding: 0.4rem 1rem;
    border-radius: 0.375rem;
    font-size: 0.875rem;
    font-weight: 600;
    text-decoration: none;
    transition: all 0.2s ease;
    white-space: nowrap;
}

.btn-chrome-promo:hover {
    background: linear-gradient(135deg, #1565c0 0%, #0d47a1 100%);
    color: #fff;
    box-shadow: 0 4px 12px rgba(21, 101, 192, 0.4);
    transform: translateY(-1px);
}

.btn-chrome-promo:active {
    transform: translateY(0);
    box-shadow: 0 2px 4px rgba(21, 101, 192, 0.3);
}

.sticky-promo-close {
    background: none;
    border: none;
    font-size: 1.5rem;
    line-height: 1;
    color: #1565c0;
    cursor: pointer;
    padding: 0 0.5rem;
    opacity: 0.7;
    transition: opacity 0.2s ease;
}

.sticky-promo-close:hover {
    opacity: 1;
}

/* Exit Intent Popup Overlay */
.exit-popup-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.6);
    z-index: 1050;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1rem;
    animation: fadeIn 0.3s ease;
}

.exit-popup-overlay.d-none {
    display: none !important;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

/* Exit Popup Modal */
.exit-popup {
    background: #fff;
    border-radius: 1rem;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    max-width: 500px;
    width: 100%;
    padding: 2rem;
    position: relative;
    text-align: center;
    animation: slideUp 0.3s ease;
}

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

.exit-popup-close {
    position: absolute;
    top: 1rem;
    right: 1rem;
    background: none;
    border: none;
    font-size: 1.75rem;
    line-height: 1;
    color: #6c757d;
    cursor: pointer;
    padding: 0.25rem;
    transition: color 0.2s ease;
}

.exit-popup-close:hover {
    color: #212529;
}

.exit-popup-title {
    font-size: 1.5rem;
    font-weight: 700;
    color: #212529;
    margin-bottom: 1.25rem;
}

.exit-popup-img {
    max-width: 100%;
    height: auto;
    border-radius: 0.5rem;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.15);
    margin-bottom: 1.25rem;
}

.exit-popup-text {
    font-size: 1rem;
    color: #495057;
    margin-bottom: 1.5rem;
    line-height: 1.5;
}

.exit-popup-buttons {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.btn-exit-install {
    background: linear-gradient(135deg, #ef4444 0%, #dc3545 100%);
    color: #fff;
    border: none;
    padding: 0.875rem 1.5rem;
    border-radius: 0.5rem;
    font-size: 1.1rem;
    font-weight: 600;
    text-decoration: none;
    transition: all 0.2s ease;
    display: inline-block;
}

.btn-exit-install:hover {
    background: linear-gradient(135deg, #dc3545 0%, #b91c1c 100%);
    color: #fff;
    box-shadow: 0 6px 20px rgba(220, 53, 69, 0.4);
    transform: translateY(-2px);
}

.btn-exit-install:active {
    transform: translateY(0);
    box-shadow: 0 2px 8px rgba(220, 53, 69, 0.3);
}

.btn-exit-decline {
    background: none;
    border: none;
    color: #6c757d;
    font-size: 0.875rem;
    cursor: pointer;
    padding: 0.5rem;
    transition: color 0.2s ease;
}

.btn-exit-decline:hover {
    color: #495057;
    text-decoration: underline;
}

