/* ===================================
   PixelPaws - Themes Page Stylesheet
   Author: Bridget Kimball
   =================================== */

/* Work in Progress Notice */
.wip-notice {
    background-color: #fff3cd;
    border: 2px solid #ffc107;
    border-radius: 8px;
    padding: 1rem 1.5rem;
    margin-bottom: 2rem;
    color: #856404;
    text-align: center;
    font-weight: 500;
}

.wip-notice p {
    margin: 0;
    font-size: 1rem;
}

/* Theme unlock notification modal */
#theme-unlock-notification {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    display: none;
    justify-content: center;
    align-items: center;
    z-index: 2000;
}

.theme-unlock-content {
    background-color: white;
    border: 4px solid var(--border-purple);
    border-radius: 12px;
    max-width: 400px;
    width: 90%;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.3);
    overflow: hidden;
    animation: slideIn 0.4s ease-out;
}

@keyframes slideIn {
    from {
        transform: translateY(-50px);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

.theme-unlock-header {
    padding: 1.5rem;
    color: white;
    text-align: center;
}

.theme-unlock-header h2 {
    margin: 0;
    font-size: 1.8rem;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.2);
}

.theme-unlock-body {
    padding: 2rem;
    text-align: center;
}

.theme-unlock-preview {
    width: 100%;
    height: 120px;
    border-radius: 8px;
    margin-bottom: 1.5rem;
    border: 2px dashed rgba(0, 0, 0, 0.2);
}

.theme-unlock-body h3 {
    font-size: 1.5rem;
    margin: 0 0 0.5rem 0;
    color: var(--text-dark);
}

.theme-unlock-body p {
    color: var(--text-dark);
    margin: 0.5rem 0;
    font-size: 0.95rem;
}

.theme-unlock-body strong {
    color: var(--primary-purple);
}

.theme-unlock-close {
    background-color: var(--primary-purple);
    color: white;
    border: none;
    padding: 0.75rem 2rem;
    border-radius: 6px;
    font-size: 1rem;
    cursor: pointer;
    font-weight: bold;
    margin-top: 1rem;
    transition: background-color 0.3s ease;
}

.theme-unlock-close:hover {
    background-color: var(--nav-active);
}

.theme-unlock-close:active {
    transform: scale(0.98);
}

main.themes-page {
    max-width: 1000px;
    margin: 2rem auto;
    padding: 0 1rem;
}

main.themes-page h1 {
    text-align: center;
    font-size: 2.5rem;
    margin-bottom: 2rem;
    color: var(--info-section-text);
    font-family: var(--font-heading);
}

/* Health bar section */
.health-section {
    background-color: var(--light-purple);
    border: 2px solid var(--border-purple);
    border-radius: 8px;
    padding: 1rem;
    margin-bottom: 2rem;
}

.health-info {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.health-info label {
    font-weight: bold;
    color: var(--text-dark);
}

.health-display {
    flex: 1;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

/* Loyalty section */
.loyalty-section {
    background-color: var(--light-purple);
    border: 2px solid var(--border-purple);
    border-radius: 8px;
    padding: 2rem;
    margin-bottom: 2rem;
}

.loyalty-section h2 {
    text-align: center;
    font-size: 1.8rem;
    margin-bottom: 0.5rem;
    color: var(--text-dark);
}

.loyalty-description {
    text-align: center;
    color: var(--text-dark);
    margin-bottom: 1.5rem;
    font-size: 1rem;
}

.calendar-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(100px, 1fr));
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.calendar-day {
    background-color: white;
    border: 2px solid var(--border-purple);
    border-radius: 8px;
    padding: 1rem;
    text-align: center;
    transition: all 0.3s ease;
    cursor: default;
}

.calendar-day.visited {
    background-color: #E6F3E6;
    border-color: #297A29;
    box-shadow: 0 0 8px rgba(102, 204, 102, 0.3);
}

.calendar-day.unvisited {
    background-color: #F5F5F5;
    color: #6E6E6E;
}

.day-number {
    font-weight: bold;
    color: var(--primary-purple);
    margin-bottom: 0.5rem;
}

.day-status {
    font-size: 1.5rem;
    font-weight: bold;
}

html[data-dark-mode="true"] .calendar-day.visited .day-status {
    color: #38A838;
}

html[data-dark-mode="false"] .calendar-day.visited .day-status {
    color: #36A136;
}

.theme-counter {
    text-align: center;
    font-size: 1.1rem;
    color: var(--text-dark);
    font-weight: bold;
    margin-bottom: 1.5rem;
}

/* Check-in section */
.checkin-section {
    text-align: center;
    padding: 1.5rem;
    background-color: rgba(255, 255, 255, 0.5);
    border-radius: 8px;
    margin-top: 1.5rem;
}

.btn-checkin {
    background-color: #297A29;
    color: white;
    border: none;
    padding: 0.75rem 1.5rem;
    border-radius: 6px;
    font-size: 1rem;
    cursor: pointer;
    transition: background-color 0.3s ease;
    font-weight: bold;
}

.btn-checkin:hover {
    background-color: #55BB55;
}

.btn-checkin:active {
    transform: scale(0.98);
}

.checkin-message {
    margin-top: 0.5rem;
    color: var(--text-dark);
    font-size: 0.9rem;
}

/* Dark Mode Settings Section */
.dark-mode-section {
    background-color: var(--light-purple);
    border: 2px solid var(--border-purple);
    border-radius: 8px;
    padding: 2rem;
    margin-bottom: 2rem;
}

.dark-mode-section h2 {
    text-align: center;
    font-size: 1.8rem;
    margin-bottom: 1rem;
    color: var(--text-dark);
}

.dark-mode-controls {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    max-width: 500px;
    margin: 0 auto;
}

.control-group {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.control-group label {
    font-weight: bold;
    color: var(--text-dark);
    min-width: 120px;
}

.control-group select {
    flex: 1;
    padding: 0.5rem;
    border: 2px solid var(--border-purple);
    border-radius: 6px;
    background-color: white;
    color: var(--text-dark);
    font-size: 1rem;
    cursor: pointer;
    font-family: inherit;
}

.control-group select:hover {
    border-color: var(--primary-purple);
}

.control-group select:focus {
    outline: none;
    border-color: var(--primary-purple);
    box-shadow: 0 0 4px rgba(102, 0, 102, 0.3);
}

.dark-mode-description {
    text-align: center;
    color: var(--primary-purple);
    font-size: 0.95rem;
    margin-top: 0.5rem;
}

.dark-mode-buttons {
    display: flex;
    gap: 0.75rem;
    justify-content: center;
    margin-top: 1rem;
}

.btn-save-dark-mode {
    background-color: var(--primary-purple);
    color: white;
    border: none;
    padding: 0.75rem 1.5rem;
    border-radius: 6px;
    font-size: 1rem;
    cursor: pointer;
    transition: background-color 0.3s ease;
    font-weight: bold;
}

.btn-save-dark-mode:hover {
    background-color: var(--nav-active);
}

.btn-save-dark-mode:active {
    transform: scale(0.98);
}

/* Reset section */
.reset-section {
    text-align: center;
    margin-bottom: 2rem;
    color: var(--info-section-text);
}

.btn-reset-theme {
    background-color: #AD0000;
    color: white;
    border: none;
    padding: 0.75rem 1.5rem;
    border-radius: 6px;
    font-size: 1rem;
    cursor: pointer;
    transition: background-color 0.3s ease;
    font-weight: bold;
}

.btn-reset-theme:hover {
    background-color: #FF3333;
}

.btn-reset-theme:active {
    transform: scale(0.98);
}

/* Themes showcase section */
.themes-showcase {
    background-color: var(--light-purple);
    border: 2px solid var(--border-purple);
    border-radius: 8px;
    padding: 2rem;
}

.themes-showcase h2 {
    font-size: 1.8rem;
    margin-bottom: 1.5rem;
    color: var(--text-dark);
    text-align: center;
}

.themes-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 1.5rem;
}

.theme-card {
    background-color: white;
    border: 2px solid var(--border-purple);
    border-radius: 8px;
    padding: 1.5rem;
    text-align: center;
    transition: all 0.3s ease;
    position: relative;
}

.theme-card:hover:not(.locked) {
    transform: translateY(-4px);
    box-shadow: 0 8px 16px rgba(102, 115, 166, 0.2);
}

.theme-card.active {
    border: 3px solid var(--primary-purple);
    background-color: var(--border-purple);
    color: white;
}

.theme-card.locked {
    opacity: 0.6;
}

.theme-color-preview {
    width: 100%;
    height: 80px;
    border-radius: 6px;
    margin-bottom: 1rem;
    border: 2px solid var(--border-purple);
}

.theme-card h3 {
    font-size: 1.3rem;
    margin-bottom: 0.5rem;
    color: var(--text-dark);
}

.theme-day {
    font-size: 0.9rem;
    color: black;
    margin-bottom: 1rem;
}

.lock-badge {
    font-size: 2rem;
    margin-bottom: 0.5rem;
}

.locked-message {
    font-size: 0.85rem;
    color: #b20101;
    font-weight: bold;
}

.active-badge {
    display: inline-block;
    background-color: #297A29;
    color: white;
    padding: 0.5rem 1rem;
    border-radius: 20px;
    font-weight: bold;
    font-size: 0.9rem;
}

.btn-select-theme {
    background-color: var(--primary-purple);
    color: white;
    border: none;
    padding: 0.6rem 1.2rem;
    border-radius: 6px;
    font-size: 0.95rem;
    cursor: pointer;
    transition: background-color 0.3s ease;
    font-weight: bold;
    width: 100%;
}

.btn-select-theme:hover {
    background-color: var(--nav-active);
}

.btn-select-theme:active {
    transform: scale(0.98);
}

/* Theme management section */
.theme-management-section {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    margin: 2rem auto;
    padding: 1.5rem;
    background-color: var(--light-purple);
    border-radius: 10px;
    border: 2px solid var(--border-purple);
    max-width: 600px;
    width: 100%;
}

.theme-buttons-container {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
    justify-content: center;
    align-items: center;
}

.btn-save-theme,
.btn-reset-theme {
    background-color: var(--primary-purple);
    color: white;
    border: none;
    padding: 0.8rem 1.5rem;
    border-radius: 8px;
    font-size: 1rem;
    cursor: pointer;
    transition: background-color 0.3s ease, transform 0.2s ease;
    font-weight: bold;
    flex: 1;
    min-width: 150px;
}

.btn-save-theme:hover,
.btn-reset-theme:hover {
    background-color: var(--nav-active);
    transform: translateY(-2px);
}

.btn-save-theme:active,
.btn-reset-theme:active {
    transform: translateY(0);
}

.theme-status-message {
    font-size: 0.95rem;
    font-weight: 600;
    text-align: center;
    min-height: 1.2rem;
    color: var(--primary-purple);
}

/* Theme save section - DEPRECATED, kept for backwards compatibility */
.theme-save-section {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1rem;
    margin-top: 2rem;
    padding: 1.5rem;
    background-color: var(--light-purple);
    border-radius: 10px;
    border: 2px solid var(--border-purple);
}

/* .btn-save-theme styling moved to line 507 - this section kept for reference only */

/* Notification styling */
#notification {
    position: fixed;
    top: 80px;
    left: 50%;
    transform: translateX(-50%);
    background-color: #297A29;
    color: white;
    padding: 1rem 1.5rem;
    border-radius: 6px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    display: none;
    z-index: 1000;
    opacity: 0;
    transition: opacity 0.3s ease;
}

/* Custom Confirmation Modal */
.confirmation-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.6);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 2000;
    animation: fadeIn 0.3s ease-out;
}

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

.confirmation-content {
    background-color: white;
    border: 3px solid var(--border-purple);
    border-radius: 12px;
    padding: 2rem;
    max-width: 400px;
    width: 90%;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.3);
    animation: slideInUp 0.4s ease-out;
}

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

.confirmation-content h2 {
    color: var(--primary-purple);
    margin-bottom: 1rem;
    text-align: center;
    font-size: 1.5rem;
}

.confirmation-content p {
    color: var(--text-dark);
    text-align: center;
    margin-bottom: 1.5rem;
    font-size: 1rem;
}

.confirmation-buttons {
    display: flex;
    gap: 1rem;
    justify-content: center;
}

.btn-confirm,
.btn-cancel {
    padding: 0.8rem 1.5rem;
    border-radius: 8px;
    font-size: 1rem;
    cursor: pointer;
    border: none;
    font-weight: bold;
    transition: all 0.3s ease;
    flex: 1;
}

.btn-confirm {
    background-color: var(--primary-purple);
    color: white;
}

.btn-confirm:hover {
    background-color: var(--nav-active);
    transform: translateY(-2px);
}

.btn-cancel {
    background-color: var(--light-purple);
    color: var(--primary-purple);
    border: 2px solid var(--border-purple);
}

.btn-cancel:hover {
    background-color: var(--border-purple);
    color: white;
}

.btn-confirm:active,
.btn-cancel:active {
    transform: translateY(0);
}

/* Responsive design */
@media (max-width: 768px) {
    main.themes-page h1 {
        font-size: 1.8rem;
        margin-bottom: 1.5rem;
    }

    .loyalty-section,
    .themes-showcase {
        padding: 1.5rem;
    }

    .themes-grid {
        grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
        gap: 1rem;
    }

    .theme-card {
        padding: 1rem;
    }

    .theme-color-preview {
        height: 60px;
    }

    .health-info {
        flex-direction: column;
        align-items: flex-start;
    }

    .health-display {
        width: 100%;
    }
}
