/* GM Habit Tracker Styles - Matching Original Design */
/* Scoped to prevent WordPress theme interference */

/* Import Inter font */
/* Fonts are loaded via wp_enqueue_style in PHP to prevent FOUT */

/* Ensure Material Symbols icons display correctly */
.material-symbols-outlined {
    font-family: 'Material Symbols Outlined' !important;
    font-weight: normal !important;
    font-style: normal !important;
    font-size: 24px !important;
    line-height: 1 !important;
    letter-spacing: normal !important;
    text-transform: none !important;
    display: inline-block !important;
    white-space: nowrap !important;
    word-wrap: normal !important;
    direction: ltr !important;
    -webkit-font-feature-settings: 'liga' !important;
    -webkit-font-smoothing: antialiased !important;
    font-variation-settings: 'FILL' 0, 'wght' 400, 'GRAD' 0, 'opsz' 24 !important;
}

.gm-habit-tracker-wrapper .material-symbols-outlined,
.gm-modal .material-symbols-outlined {
    font-family: 'Material Symbols Outlined' !important;
    font-weight: normal !important;
    font-style: normal !important;
    font-variation-settings: 'FILL' 0, 'wght' 400, 'GRAD' 0, 'opsz' 24 !important;
}

.gm-habit-tracker-wrapper .gm-reset-heart-icon.material-symbols-outlined {
    font-size: 8rem !important;
}

/* CSS Reset for Plugin - Override WordPress theme styles */
.gm-habit-tracker-wrapper,
.gm-habit-tracker-wrapper *,
.gm-habit-tracker-wrapper *::before,
.gm-habit-tracker-wrapper *::after {
    box-sizing: border-box !important;
    margin: 0;
    padding: 0;
}

.gm-habit-tracker-wrapper {
    /* Reset common WordPress theme styles */
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif !important;
    font-size: 16px !important;
    line-height: 1.5 !important;
    color: #111818 !important;
    background-color: rgb(250, 250, 249) !important;
    width: 100% !important;
    /* Prevent theme font inheritance */
    font-weight: normal !important;
    font-style: normal !important;
    text-transform: none !important;
    letter-spacing: normal !important;
}

.gm-habit-tracker-wrapper *:not(.material-symbols-outlined) {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif !important;
}

.gm-habit-tracker-wrapper .material-symbols-outlined,
.gm-modal .material-symbols-outlined {
    font-family: 'Material Symbols Outlined' !important;
}

.gm-habit-tracker-wrapper h1,
.gm-habit-tracker-wrapper h2,
.gm-habit-tracker-wrapper h3,
.gm-habit-tracker-wrapper h4,
.gm-habit-tracker-wrapper h5,
.gm-habit-tracker-wrapper h6 {
    font-weight: 900 !important;
    line-height: 1.2 !important;
    margin: 0 !important;
    padding: 0 !important;
    color: #111818 !important;
}

.gm-habit-tracker-wrapper p {
    margin: 0 !important;
    padding: 0 !important;
}

.gm-habit-tracker-wrapper a {
    text-decoration: none !important;
    color: inherit !important;
}

.gm-habit-tracker-wrapper input,
.gm-habit-tracker-wrapper select,
.gm-habit-tracker-wrapper textarea {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif !important;
    font-size: inherit !important;
    line-height: inherit !important;
    margin: 0 !important;
    padding: 0 !important;
    border: none !important;
    background: none !important;
    box-shadow: none !important;
    outline: none !important;
}

/* Buttons should not be reset - they need their styles */
.gm-habit-tracker-wrapper button {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif !important;
    font-size: inherit !important;
    line-height: inherit !important;
    margin: 0 !important;
    outline: none !important;
    /* Don't reset display, padding, background, border, or box-shadow for buttons */
    cursor: pointer !important;
    visibility: visible !important;
    opacity: 1 !important;
}

.gm-habit-tracker-wrapper ul,
.gm-habit-tracker-wrapper ol {
    list-style: none !important;
    margin: 0 !important;
    padding: 0 !important;
}

.gm-habit-tracker-wrapper img {
    max-width: 100% !important;
    height: auto !important;
    display: block !important;
}

/* Modal reset - prevent theme styles */
.gm-modal,
.gm-modal *,
.gm-modal *::before,
.gm-modal *::after {
    box-sizing: border-box !important;
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif !important;
}

:root {
    --primary-color: #FBAA1A;
    --primary-rgb: 251, 170, 26;
}

.gm-habit-tracker-wrapper {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif !important;
    background-color: rgb(250, 250, 249) !important;
    min-height: 100vh;
    padding: 0 !important;
    width: 100% !important;
    /* Reset WordPress theme styles */
    position: relative !important;
    z-index: 1 !important;
    isolation: isolate !important;
}

.gm-habit-tracker-container {
    width: 100% !important;
    max-width: 100% !important;
    margin: 0 auto;
    padding: 1.5rem 1rem 2.5rem;
}

@media (min-width: 768px) {
    .gm-habit-tracker-container {
        padding: 2.5rem 2rem 2.5rem;
    }
}

@media (min-width: 1024px) {
    .gm-habit-tracker-container {
        padding: 2.5rem 2.5rem 2.5rem;
    }
}

/* Header Section */
.gm-header-section {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 1.5rem;
}

.gm-page-title {
    font-size: 1.875rem;
    font-weight: 900;
    color: #111818;
    margin: 0;
    line-height: 1.2;
    letter-spacing: -0.02em;
}

@media (min-width: 768px) {
    .gm-page-title {
        font-size: 2.25rem;
    }
}

.gm-page-subtitle {
    color: #6B7280;
    margin: 0.5rem 0 0 0;
    font-weight: 500;
}

.gm-header-actions {
    display: flex !important;
    align-items: center !important;
    gap: 0.5rem !important;
    visibility: visible !important;
    opacity: 1 !important;
}

/* Main Grid Layout */
.gm-main-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 1.5rem;
    align-items: start;
}

@media (min-width: 1280px) {
    .gm-main-grid {
        grid-template-columns: 1fr 1fr;
    }
}

/* Left Column */
.gm-left-column {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

/* Right Column */
.gm-right-column {
    background: white;
    border-radius: 0.75rem;
    padding: 1.5rem;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
    border: 1px solid #E5E7EB;
    min-height: 400px;
}

@media (min-width: 768px) {
    .gm-right-column {
        padding: 2rem;
    }
}

/* Card Styles */
.gm-card {
    background: white;
    border-radius: 0.75rem;
    padding: 1.5rem;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
    border: 1px solid #E5E7EB;
}

.gm-card-header {
    display: flex;
    flex-direction: column;
    margin-bottom: 1rem;
}

.gm-card-missed .gm-card-header {
    flex-direction: row;
    justify-content: space-between;
    align-items: flex-start;
}

.gm-card-title {
    font-size: 1.25rem;
    font-weight: 900;
    color: #111818;
    margin: 0;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.gm-icon-primary {
    color: rgb(251, 170, 26);
    font-size: 1.5rem;
}

.gm-card-date {
    color: #6B7280;
    font-size: 0.875rem;
    margin: 0.5rem 0 0 0;
}

.gm-habit-tracker-wrapper .gm-card-subtitle {
    color: #6B7280;
    font-size: 0.875rem;
    margin: 0.25rem 0 1.5rem 0 !important;
    padding: 0 !important;
}

/* Streak Reset Banner */
.gm-reset-banner-section {
    margin-bottom: 1rem;
}

.gm-reset-banner {
    background: white;
    border-radius: 0.75rem;
    padding: 1rem 1.5rem;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
    border: 1px solid rgba(251, 146, 60, 0.3);
    position: relative;
}

.gm-reset-banner-close {
    position: absolute;
    top: 1rem;
    right: 1rem;
    background: none;
    border: none;
    color: #9CA3AF;
    cursor: pointer;
    padding: 0.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: color 0.2s;
}

.gm-reset-banner-close:hover {
    color: #6B7280;
}

.gm-reset-banner-close .material-symbols-outlined {
    font-size: 1.5rem;
}

.gm-reset-banner-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1rem;
}

/* Broken Heart Icon */
.gm-reset-heart-wrapper {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    max-width: 180px;
    aspect-ratio: 1;
}

.gm-reset-heart-bg {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    border-radius: 50%;
    opacity: 0.1;
    background: linear-gradient(to top right, #EF4444, transparent);
}

.gm-reset-heart-content {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    z-index: 10;
    width: 100%;
    height: 100%;
}

.gm-reset-heart-icon {
    font-size: 8rem !important;
    color: #EF4444;
    font-variation-settings: 'FILL' 0, 'wght' 200;
    filter: drop-shadow(0 0 8px rgba(239, 68, 68, 0.3));
    user-select: none;
    line-height: 1;
    display: block;
    position: relative;
}

.gm-reset-badge {
    position: absolute;
    top: -0.5rem;
    right: -0.5rem;
    background: #EF4444;
    color: white;
    font-size: 0.625rem;
    font-weight: 800;
    padding: 0.25rem 0.5rem;
    border-radius: 9999px;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    white-space: nowrap;
}

/* Text Content */
.gm-reset-text {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
    text-align: center;
    max-width: 500px;
}

.gm-reset-title {
    font-size: 1.5rem;
    font-weight: 800;
    letter-spacing: -0.025em;
    line-height: 1.2;
    color: #111818;
    margin: 0;
}

.gm-reset-habit-name {
    font-size: 1.125rem;
    font-weight: 700;
    color: #111818;
    margin: 0;
}

.gm-reset-habit-name-highlight {
    color: var(--primary-color);
    font-weight: 800;
}

.gm-reset-message {
    font-size: 1rem;
    font-weight: 500;
    color: #6B7280;
    margin: 0;
}

/* Stats Grid */
.gm-reset-stats {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.75rem;
    width: 100%;
    max-width: 28rem;
}

.gm-reset-stat-card {
    display: flex;
    flex-direction: column;
    gap: 0.375rem;
    border-radius: 0.75rem;
    padding: 1rem;
    background: #F9FAFB;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
    border: 1px solid #E5E7EB;
}

.gm-reset-stat-card-best {
    background: rgba(var(--primary-rgb), 0.1);
    border-color: rgba(var(--primary-rgb), 0.2);
}

.gm-reset-stat-label {
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: #6B7280;
    margin: 0;
}

.gm-reset-stat-label-best {
    color: var(--primary-color);
}

.gm-reset-stat-value {
    display: flex;
    align-items: baseline;
    gap: 0.25rem;
}

.gm-reset-stat-number {
    font-size: 1.875rem;
    font-weight: 800;
    line-height: 1;
    color: #111818;
}

.gm-reset-stat-number-best {
    color: var(--primary-color);
}

.gm-reset-stat-change {
    font-size: 0.75rem;
    font-weight: 700;
    color: #EF4444;
}

.gm-reset-stat-unit {
    font-size: 0.75rem;
    font-weight: 700;
    color: var(--primary-color);
}

.gm-reset-stat-sublabel {
    font-size: 0.625rem;
    font-weight: 500;
    color: #9CA3AF;
    margin: 0;
}

.gm-reset-stat-sublabel-best {
    color: rgba(var(--primary-rgb), 0.6);
}

/* Additional Missed Habits */
.gm-reset-additional-habits {
    width: 100%;
    max-width: 28rem;
    margin-top: 0.5rem;
}

.gm-reset-additional-title {
    font-size: 0.75rem;
    font-weight: 700;
    color: #6B7280;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin: 0 0 0.5rem 0;
    text-align: center;
}

.gm-reset-additional-list {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.gm-reset-additional-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.5rem 0.75rem;
    background: #F9FAFB;
    border-radius: 0.5rem;
    border: 1px solid #E5E7EB;
}

.gm-reset-additional-name {
    font-size: 0.875rem;
    font-weight: 700;
    color: #111818;
}

.gm-reset-additional-streak {
    font-size: 0.75rem;
    color: #6B7280;
    font-weight: 600;
}

/* Restart Button */
.gm-reset-button-wrapper {
    width: 100%;
    max-width: 28rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.375rem;
    margin-top: 0.25rem;
}

.gm-reset-button {
    width: 100%;
    background: var(--primary-color);
    color: white;
    padding: 0.875rem 1.25rem;
    border-radius: 0.75rem;
    font-size: 1rem;
    font-weight: 800;
    box-shadow: 0 8px 30px rgba(251, 170, 26, 0.3);
    border: none;
    cursor: pointer;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
}

.gm-reset-button:hover {
    background: rgba(var(--primary-rgb), 0.9);
}

.gm-reset-button:active {
    transform: scale(0.95);
}

.gm-reset-button-hint {
    text-align: center;
    font-size: 0.6875rem;
    color: #9CA3AF;
    text-transform: uppercase;
    letter-spacing: 0.2em;
    font-weight: 700;
    margin: 0;
}

/* Progress Ring */
.gm-progress-section {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1rem;
}

.gm-progress-ring-wrapper {
    position: relative;
    width: 144px;
    height: 144px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.gm-progress-ring {
    width: 100%;
    height: 100%;
    transform: rotate(-90deg);
}

.gm-progress-bg {
    fill: none;
    stroke: #E5E7EB;
    stroke-width: 10;
}

.gm-progress-fill {
    fill: none;
    stroke: var(--primary-color);
    stroke-width: 10;
    stroke-linecap: round;
    transition: stroke-dashoffset 0.3s ease;
}

.gm-progress-text {
    position: absolute;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.gm-progress-percentage {
    font-size: 1.875rem;
    font-weight: 800;
    color: #111818;
    line-height: 1;
}

.gm-progress-label {
    font-size: 0.625rem;
    font-weight: 700;
    color: var(--primary-color);
    letter-spacing: 0.1em;
    text-transform: uppercase;
}

.gm-progress-stats {
    color: #111818;
    font-size: 0.875rem;
    font-weight: 700;
    text-align: center;
}

/* Milestones */
.gm-milestones-section {
    margin-top: 1rem;
    padding-top: 1rem;
    border-top: 1px solid #E5E7EB;
}

.gm-habit-tracker-wrapper .gm-milestones-title,
.gm-milestones-title {
    font-size: 0.75rem;
    font-weight: 800;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: #6B7280;
    margin: 0 0 0.75rem 0 !important;
}

.gm-milestones-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 0.5rem;
}

.gm-milestone-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem;
    border-radius: 0.5rem;
    border: 1px solid #E5E7EB;
    background: #F9FAFB;
    opacity: 0.5;
}

.gm-milestone-item.earned {
    background: rgba(var(--primary-rgb), 0.05);
    border-color: rgba(var(--primary-rgb), 0.2);
    opacity: 1;
}

.gm-milestone-icon {
    font-size: 1rem;
    flex-shrink: 0;
    color: #9CA3AF;
}

.gm-milestone-item.earned .gm-milestone-icon {
    color: var(--primary-color);
}

.gm-milestone-content {
    display: flex;
    flex-direction: column;
    min-width: 0;
    flex: 1;
}

.gm-milestone-days {
    font-size: 0.625rem;
    font-weight: 700;
    color: #9CA3AF;
}

.gm-milestone-item.earned .gm-milestone-days {
    color: #111818;
}

.gm-milestone-name {
    font-size: 0.75rem;
    font-weight: 700;
    color: #9CA3AF;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.gm-milestone-item.earned .gm-milestone-name {
    color: #374151;
}

.gm-milestone-badge {
    margin-left: auto;
    padding: 0.125rem 0.375rem;
    background: rgba(var(--primary-rgb), 0.2);
    color: var(--primary-color);
    font-size: 0.5625rem;
    font-weight: 700;
    border-radius: 9999px;
    flex-shrink: 0;
}

/* Week Grid */
.gm-week-grid {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 0.375rem;
}

.gm-week-day {
    border-radius: 0.5rem;
    padding: 0.5rem;
    border: 1px solid #E5E7EB;
    min-height: 80px;
    cursor: pointer;
    transition: all 0.2s;
}

.gm-week-day:hover {
    border-color: rgba(var(--primary-rgb), 0.5);
}

.gm-week-day.today {
    background: rgba(var(--primary-rgb), 0.1);
    border-color: var(--primary-color);
}

.gm-week-day-name {
    font-size: 0.625rem;
    font-weight: 700;
    color: #6B7280;
}

.gm-week-day.today .gm-week-day-name {
    color: var(--primary-color);
}

.gm-week-day-num {
    font-size: 1rem;
    font-weight: 700;
    color: #111818;
    margin-top: 0.25rem;
}

.gm-week-day.today .gm-week-day-num {
    color: var(--primary-color);
}

.gm-week-day-stats {
    font-size: 0.5625rem;
    font-weight: 700;
    color: #6B7280;
    margin-top: 0.125rem;
}

/* Habits Header */
.gm-habits-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 1.5rem;
}

.gm-habits-count {
    font-size: 0.875rem;
    font-weight: 700;
    color: #6B7280;
}

/* Empty State */
.gm-empty-state {
    text-align: center;
    padding: 3rem 1rem;
}

.gm-empty-icon {
    width: 5rem;
    height: 5rem;
    margin: 0 auto 1rem;
    border-radius: 9999px;
    background: rgba(var(--primary-rgb), 0.1);
    display: flex;
    align-items: center;
    justify-content: center;
}

.gm-empty-icon .material-symbols-outlined {
    font-size: 2.5rem;
    color: var(--primary-color);
}

.gm-empty-title {
    font-size: 1.25rem;
    font-weight: 900;
    color: #111818;
    margin: 0 0 0.5rem 0;
}

.gm-empty-text {
    color: #6B7280;
    margin: 0 0 1.5rem 0;
}

/* Habits Grid */
.gm-habits-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1rem;
}

.gm-habit-card {
    background: #F9FAFB;
    border-radius: 1rem;
    padding: 1.25rem;
    border: 1px solid #E5E7EB;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
    transition: all 0.2s;
}

.gm-habit-content {
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    gap: 1rem;
    flex: 1;
}

.gm-habit-header-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.gm-habit-badges {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.gm-badge {
    padding: 0.125rem 0.5rem;
    border-radius: 0.25rem;
    font-size: 0.625rem;
    font-weight: 700;
    letter-spacing: 0.1em;
    text-transform: uppercase;
}

.gm-badge-completed {
    background: rgba(var(--primary-rgb), 0.2);
    color: var(--primary-color);
}

.gm-badge-pending {
    background: #F3F4F6;
    color: #6B7280;
}

.gm-habit-actions {
    display: flex;
    align-items: center;
    gap: 0.25rem;
}

.gm-habit-name {
    color: #111818;
    font-size: 1.125rem;
    font-weight: 700;
    line-height: 1.2;
    margin: 0.25rem 0 0 0;
    cursor: pointer;
}

.gm-habit-meta {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.gm-habit-streak {
    display: flex;
    align-items: center;
    gap: 0.25rem;
    font-size: 0.875rem;
    font-weight: 700;
    cursor: pointer;
}

.gm-habit-streak .material-symbols-outlined {
    font-size: 0.875rem;
    font-variation-settings: 'FILL' 1;
}

.gm-habit-reminder-time {
    display: flex;
    align-items: center;
    gap: 0.25rem;
    font-size: 0.75rem;
    font-weight: 600;
    color: #6B7280;
}

.gm-habit-reminder-time .material-symbols-outlined {
    font-size: 0.875rem;
    font-variation-settings: 'FILL' 0;
}

.gm-habit-complete-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 0.75rem;
    height: 2.5rem;
    padding: 0 1rem;
    gap: 0.5rem;
    font-size: 0.875rem;
    font-weight: 700;
    transition: all 0.2s;
    cursor: pointer !important;
    border: 1px solid transparent;
    background: #F3F4F6;
    color: #374151;
    pointer-events: auto !important;
}

.gm-habit-complete-btn:hover {
    opacity: 0.8;
}

.gm-habit-complete-btn.completed {
    color: white;
    box-shadow: 0 10px 25px -5px rgba(var(--primary-rgb), 0.2);
    cursor: pointer !important;
    pointer-events: auto !important;
}

.gm-habit-complete-btn.completed:hover {
    opacity: 0.9;
}

.gm-habit-complete-btn .material-symbols-outlined {
    font-size: 1.125rem;
}

/* Buttons */
.gm-btn {
    padding: 0.625rem 1.25rem !important;
    border: none !important;
    border-radius: 0.5rem !important;
    font-weight: 700 !important;
    font-size: 0.875rem !important;
    cursor: pointer !important;
    transition: all 0.2s !important;
    display: inline-flex !important;
    align-items: center !important;
    gap: 0.5rem !important;
    visibility: visible !important;
    opacity: 1 !important;
    margin: 0 !important;
    text-decoration: none !important;
    box-shadow: none !important;
}

.gm-btn-primary {
    background: var(--primary-color) !important;
    color: white !important;
    box-shadow: 0 4px 6px rgba(var(--primary-rgb), 0.2) !important;
}

.gm-btn-primary:hover {
    background: rgba(var(--primary-rgb), 0.9) !important;
    box-shadow: 0 4px 6px rgba(var(--primary-rgb), 0.3) !important;
}

.gm-btn-secondary {
    background: #E5E7EB !important;
    color: #111818 !important;
}

.gm-btn-secondary:hover {
    background: #D1D5DB !important;
}

.gm-btn-secondary {
    background: #E5E7EB;
    color: #111818;
}

.gm-btn-secondary:hover {
    background: #D1D5DB;
}

.gm-btn-icon {
    background: none;
    border: none;
    cursor: pointer;
    padding: 0.5rem;
    border-radius: 0.5rem;
    color: #9CA3AF;
    transition: all 0.2s;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.gm-btn-icon:hover {
    background: rgba(var(--primary-rgb), 0.1);
    color: var(--primary-color);
}

/* Modal - Hidden by default */
.gm-modal {
    position: fixed !important;
    inset: 0 !important;
    background: rgba(0, 0, 0, 0.5) !important;
    display: none !important;
    align-items: center !important;
    justify-content: center !important;
    z-index: 999999 !important;
    padding: 1rem !important;
    /* Reset WordPress theme styles */
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif !important;
    font-size: 16px !important;
    line-height: 1.5 !important;
    color: #111818 !important;
    margin: 0 !important;
    border: none !important;
    box-shadow: none !important;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s, visibility 0.3s;
}

.gm-modal.show,
.gm-modal[style*="display: flex"],
.gm-modal[style*="display: block"] {
    display: flex !important;
    opacity: 1 !important;
    visibility: visible !important;
}

.gm-modal-overlay {
    position: absolute;
    inset: 0;
    cursor: pointer;
}

.gm-modal-content-large {
    background: white !important;
    border-radius: 0.75rem !important;
    max-width: 42rem !important;
    width: 100% !important;
    max-height: 95vh !important;
    overflow-y: auto !important;
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05) !important;
    position: relative !important;
    z-index: 1 !important;
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif !important;
    /* Reset WordPress theme styles */
    margin: 0 !important;
    padding: 0 !important;
    border: none !important;
}

.gm-modal-content-large * {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif !important;
}

.gm-modal-content-xlarge {
    background: white !important;
    border-radius: 0.75rem !important;
    max-width: 80rem !important;
    width: 95% !important;
    max-height: 95vh !important;
    overflow-y: auto !important;
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05) !important;
    position: relative !important;
    z-index: 1 !important;
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif !important;
    /* Reset WordPress theme styles */
    margin: 0 !important;
    padding: 0 !important;
    border: none !important;
}

.gm-modal-content-xlarge * {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif !important;
}

.gm-modal-content-medium {
    background: white !important;
    border-radius: 0.75rem !important;
    max-width: 28rem !important;
    width: 100% !important;
    max-height: 80vh !important;
    overflow-y: auto !important;
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05) !important;
    position: relative !important;
    z-index: 1 !important;
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif !important;
    /* Reset WordPress theme styles */
    margin: 0 !important;
    padding: 0 !important;
    border: none !important;
}

.gm-modal-content-medium * {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif !important;
}

.gm-day-badge {
    font-size: 0.75rem;
    font-weight: 700;
    color: var(--primary-color);
    margin-top: 0.25rem;
    display: inline-block;
}

.gm-day-schedule-content {
    padding: 1.5rem;
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.gm-day-section {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.gm-day-section-title {
    font-size: 0.875rem;
    font-weight: 800;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: #111818;
    margin: 0;
}

.gm-day-habits-list {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

/* Day Schedule Completion Button */
.gm-day-habit-complete-btn {
    padding: 0.625rem 1.25rem;
    border-radius: 0.5rem;
    font-size: 0.875rem;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.2s;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    border: 2px solid;
    background: white;
    color: #111818;
    margin-left: auto;
    min-width: 7.5rem;
}

.gm-day-habit-complete-btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.gm-day-habit-complete-btn.completed {
    color: white;
}

.gm-day-habit-complete-btn.completed:hover {
    transform: translateY(-1px);
}

.gm-day-habit-complete-btn .material-symbols-outlined {
    font-size: 1.125rem;
}

.gm-day-habit-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1rem;
    border-radius: 0.75rem;
    border: 1px solid #E5E7EB;
    border-left-width: 4px;
    background: #F9FAFB;
}

.gm-day-habit-item.completed {
    background: rgba(var(--primary-rgb), 0.05);
}

.gm-day-habit-item.past {
    opacity: 0.6;
}

.gm-day-habit-icon-wrapper {
    width: 2.5rem;
    height: 2.5rem;
    border-radius: 0.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
}

.gm-day-habit-icon-wrapper .material-symbols-outlined {
    font-size: 1.25rem;
}

.gm-day-habit-info {
    flex: 1;
    margin-left: 0.75rem;
}

.gm-day-habit-name {
    font-size: 0.875rem;
    font-weight: 700;
    color: #111818;
    margin: 0 0 0.25rem 0;
}

.gm-day-habit-item.completed .gm-day-habit-name {
    color: var(--primary-color);
}

.gm-day-habit-item.past .gm-day-habit-name {
    color: #9CA3AF;
}

.gm-day-habit-type {
    font-size: 0.75rem;
    color: #6B7280;
    margin: 0;
}

.gm-day-habit-status {
    padding: 0.25rem 0.75rem;
    font-size: 0.75rem;
    font-weight: 700;
    border-radius: 9999px;
}

.gm-day-habit-status.completed {
    background: rgba(var(--primary-rgb), 0.2);
    color: var(--primary-color);
}

.gm-day-habit-status.missed {
    background: #E5E7EB;
    color: #6B7280;
}

.gm-day-habit-status.pending {
    background: #FEF3C7;
    color: #D97706;
}

.gm-day-empty {
    color: #6B7280;
    font-size: 0.875rem;
}

.gm-modal-header-new {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.5rem;
    border-bottom: 1px solid #F3F4F6;
}

.gm-modal-title-large {
    margin: 0;
    font-size: 1.5rem;
    font-weight: 900;
    color: #111818;
}

.gm-modal-close-btn {
    background: none;
    border: none;
    cursor: pointer;
    color: #9CA3AF;
    padding: 0.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: color 0.2s;
}

.gm-modal-close-btn:hover {
    color: #6B7280;
}

.gm-modal-form {
    padding: 1.5rem;
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.gm-form-section {
    width: 100%;
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.gm-form-error {
    padding: 0.75rem;
    background: #FEF2F2;
    border: 1px solid #FECACA;
    border-radius: 0.5rem;
    color: #DC2626;
    font-size: 0.875rem;
}

/* Habit Name Input */
.gm-habit-name-input {
    width: 100%;
    background: transparent;
    border: none;
    border-bottom: 2px solid #D1D5DB;
    font-size: 1.5rem;
    font-weight: 700;
    padding: 0.75rem 0;
    transition: border-color 0.2s;
    outline: none;
    color: #111818;
}

.gm-habit-name-input:focus {
    border-bottom-color: var(--primary-color);
}

.gm-habit-name-input::placeholder {
    color: #9CA3AF;
}

/* Category Grid */
.gm-category-grid {
    display: flex;
    gap: 0.75rem;
    justify-content: space-between;
    width: 100%;
}

.gm-category-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
    flex: 1;
}

.gm-category-btn {
    width: 100%;
    aspect-ratio: 1;
    border-radius: 1rem;
    border: none;
    background: #E5E7EB;
    color: #6B7280;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
    padding: 0;
}

.gm-category-btn:hover {
    background: #D1D5DB;
}

.gm-category-btn.active {
    background: var(--primary-color);
    color: white;
    box-shadow: 0 10px 15px -3px rgba(var(--primary-rgb), 0.2);
    transform: scale(1.05);
}

.gm-category-btn .material-symbols-outlined {
    font-size: 1.5rem;
    font-variation-settings: 'FILL' 0, 'wght' 400, 'GRAD' 0, 'opsz' 24;
}

.gm-category-label {
    font-size: 0.625rem;
    font-weight: 700;
    text-align: center;
    color: #6B7280;
    margin-top: 0;
    line-height: 1.2;
}

.gm-category-item:has(.gm-category-btn.active) .gm-category-label {
    color: var(--primary-color);
}

/* Color Picker */
.gm-form-label {
    font-size: 0.875rem;
    font-weight: 700;
    color: #374151;
    display: block;
    margin-bottom: 0;
}

.gm-color-picker {
    display: flex;
    gap: 0.5rem;
    width: 100%;
}

.gm-color-btn {
    width: 2.5rem;
    height: 2.5rem;
    border-radius: 0.5rem;
    border: none;
    cursor: pointer;
    transition: all 0.2s;
    position: relative;
    padding: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.gm-color-btn:hover {
    transform: scale(1.05);
}

.gm-color-btn.active {
    transform: scale(1.05);
    box-shadow: 0 0 0 2px white, 0 0 0 4px #111818;
}

.gm-color-btn.active::after {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: 0.5rem;
    box-shadow: inset 0 0 0 2px white, inset 0 0 0 4px #111818;
    pointer-events: none;
}

.gm-color-check {
    display: none !important;
    color: white;
    font-size: 0.875rem;
    filter: drop-shadow(0 1px 2px rgba(0, 0, 0, 0.3));
}

.gm-color-btn.active .gm-color-check {
    display: block !important;
}

/* Frequency Toggle */
.gm-frequency-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    margin-bottom: 0;
}

.gm-frequency-toggle {
    display: flex;
    background: #E5E7EB;
    padding: 0.25rem;
    border-radius: 0.5rem;
    gap: 0;
}

.gm-frequency-btn {
    padding: 0.375rem 1rem;
    font-size: 0.75rem;
    font-weight: 700;
    border-radius: 0.375rem;
    border: none;
    background: transparent;
    color: #6B7280;
    cursor: pointer;
    transition: all 0.2s;
    white-space: nowrap;
}

.gm-frequency-btn.active {
    background: var(--primary-color);
    color: white;
}

.gm-specific-days-grid {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 0.5rem;
    width: 100%;
}

.gm-day-btn {
    aspect-ratio: 1;
    border-radius: 0.5rem;
    border: none;
    background: #E5E7EB;
    color: #6B7280;
    font-size: 0.75rem;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
}

.gm-day-btn:hover {
    background: #D1D5DB;
}

.gm-day-btn.selected {
    background: var(--primary-color);
    color: white;
}

/* Reminder Section */
.gm-reminder-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    margin-bottom: 0;
}

.gm-form-section:has(.gm-reminder-header) {
    gap: 0.75rem;
}

.gm-reminder-label-group {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.gm-reminder-icon {
    color: #F97316;
    font-size: 1.5rem;
}

.gm-form-sublabel {
    font-size: 0.75rem;
    color: #6B7280;
    display: block;
    margin-top: 0.25rem;
}

/* Toggle Switch */
.gm-toggle-switch {
    position: relative;
    display: inline-flex;
    align-items: center;
    cursor: pointer;
}

.gm-toggle-switch input {
    position: absolute;
    opacity: 0;
    width: 0;
    height: 0;
}

.gm-toggle-slider {
    width: 2.75rem;
    height: 1.5rem;
    background: #D1D5DB;
    border-radius: 9999px;
    position: relative;
    transition: background 0.2s;
}

.gm-toggle-slider:before {
    content: '';
    position: absolute;
    width: 1.25rem;
    height: 1.25rem;
    left: 0.125rem;
    top: 50%;
    transform: translateY(-50%);
    background: white;
    border-radius: 50%;
    transition: transform 0.2s;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
}

.gm-toggle-switch input:checked + .gm-toggle-slider {
    background: #F97316;
}

.gm-toggle-switch input:checked + .gm-toggle-slider:before {
    transform: translate(1.25rem, -50%);
}

.gm-reminder-time-group {
    margin-top: 0;
}

.gm-time-picker-wrapper {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    width: 100%;
}

.gm-time-select {
    padding: 0.75rem;
    border-radius: 0.5rem;
    border: 1px solid #D1D5DB;
    font-size: 0.875rem;
    font-weight: 700;
    background: white;
    color: #111818;
    outline: none;
    transition: border-color 0.2s;
    cursor: pointer;
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%23111818' d='M6 9L1 4h10z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 0.75rem center;
    padding-right: 2.5rem;
}

.gm-time-select:focus {
    border-color: #F97316;
    box-shadow: 0 0 0 2px rgba(249, 115, 22, 0.2);
}

.gm-time-select:hover {
    border-color: #9CA3AF;
}

.gm-time-separator {
    font-size: 1rem;
    font-weight: 700;
    color: #111818;
    margin: 0;
    flex-shrink: 0;
}

.gm-time-ampm {
    min-width: 5rem;
}

#gm-reminder-hour {
    min-width: 4rem;
}

#gm-reminder-minute {
    min-width: 4rem;
}

/* Modal Footer */
/* Delete Confirmation Modal */
.gm-delete-message {
    font-size: 1rem;
    color: #111818;
    margin: 0 0 1.5rem 0;
    text-align: center;
}

.gm-delete-options {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.gm-delete-option-btn {
    display: flex;
    align-items: flex-start;
    gap: 1rem;
    padding: 1rem;
    border: 2px solid #E5E7EB;
    border-radius: 0.75rem;
    background: white;
    cursor: pointer;
    transition: all 0.2s;
    text-align: left;
    width: 100%;
}

.gm-delete-option-btn:hover {
    border-color: var(--primary-color);
    background: rgba(var(--primary-rgb), 0.05);
}

.gm-delete-option-btn .material-symbols-outlined {
    font-size: 1.5rem;
    color: var(--primary-color);
    flex-shrink: 0;
}

.gm-delete-option-btn strong {
    display: block;
    font-size: 0.875rem;
    font-weight: 700;
    color: #111818;
    margin-bottom: 0.25rem;
}

.gm-delete-option-btn p {
    font-size: 0.75rem;
    color: #6B7280;
    margin: 0;
    line-height: 1.5;
}

.gm-delete-option-danger {
    border-color: #EF4444;
}

.gm-delete-option-danger:hover {
    border-color: #DC2626;
    background: rgba(239, 68, 68, 0.05);
}

.gm-delete-option-danger .material-symbols-outlined {
    color: #EF4444;
}

.gm-delete-option-danger strong {
    color: #DC2626;
}

/* Modal Body */
.gm-modal-body {
    padding: 1.5rem;
}

.gm-modal-footer {
    display: flex;
    gap: 0.75rem;
    padding-top: 1rem;
    border-top: 1px solid #E5E7EB;
    margin-top: 0;
}

.gm-btn-cancel {
    padding: 0.625rem 1.5rem;
    font-size: 0.875rem;
    font-weight: 700;
    color: #6B7280;
    background: none;
    border: none;
    cursor: pointer;
    transition: color 0.2s;
    text-align: left;
}

.gm-btn-cancel:hover {
    color: #111818;
}

.gm-btn-submit {
    flex: 1;
    padding: 0.625rem 1.5rem;
    background: var(--primary-color);
    color: white;
    border: none;
    border-radius: 0.5rem;
    font-size: 0.875rem;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    box-shadow: 0 10px 15px -3px rgba(var(--primary-rgb), 0.2);
    min-height: 2.5rem;
}

.gm-btn-submit:hover:not(:disabled) {
    background: rgba(var(--primary-rgb), 0.9);
}

.gm-btn-submit:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.gm-btn-submit .material-symbols-outlined {
    font-size: 0.875rem;
}

/* Responsive */
@media (max-width: 768px) {
    .gm-habits-grid {
        grid-template-columns: 1fr;
    }
    
    .gm-header-section {
        flex-direction: column;
        align-items: flex-start;
        gap: 1rem;
    }
    
    .gm-week-grid {
        gap: 0.25rem;
    }
    
    .gm-week-day {
        min-height: 60px;
        padding: 0.375rem;
    }
    
    /* Calendar Mobile Styles */
    .gm-calendar-page-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 1rem;
        margin-bottom: 1rem;
        padding-bottom: 1rem;
    }
    
    .gm-calendar-page-header .gm-page-title {
        font-size: 1.5rem;
        text-align: left;
        width: 100%;
    }
    
    .gm-calendar-page-header .gm-page-subtitle {
        font-size: 0.875rem;
        text-align: left;
    }
    
    .gm-calendar-page-header .gm-btn {
        width: 100%;
        justify-content: start;
        font-size: 0.875rem;
        padding: 0.625rem 1rem;
    }
    
    .gm-calendar-page-container {
        padding: 1rem;
        border-radius: 0.5rem;
    }
    
    .gm-calendar-content {
        padding: 0.75rem;
    }
    
    .gm-calendar-nav {
        margin-bottom: 1rem;
        justify-content: space-between;
    }
    
    .gm-calendar-nav-btn {
        padding: 0.375rem;
        min-width: 2rem;
        min-height: 2rem;
    }
    
    .gm-calendar-nav-btn .material-symbols-outlined {
        font-size: 1.25rem;
    }
    
    .gm-calendar-month-year {
        font-size: 1rem;
        text-align: center;
        margin: 0;
    }
    
    .gm-calendar-grid {
        gap: 0.5rem;
        margin-bottom: 1rem;
    }
    
    .gm-calendar-day-header {
        font-size: 0.625rem;
        padding: 0.375rem 0.125rem;
        text-transform: uppercase;
        letter-spacing: 0;
    }
    
    .gm-calendar-days-container {
        gap: 0.5rem;
    }
    
    .gm-calendar-day {
        padding: 0.5rem;
        min-height: 0;
        width: 100%;
        aspect-ratio: 1;
        overflow: hidden;
        display: flex;
        flex-direction: column;
        justify-content: flex-start;
        align-items: flex-start;
        box-sizing: border-box;
        max-width: 100%;
    }
    
    .gm-calendar-day-number {
        font-size: 0.875rem;
        margin-bottom: 0;
        line-height: 1;
        font-weight: 700;
    }
    
    .gm-calendar-day-events {
        display: none;
    }
    
    .gm-calendar-legend {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.75rem;
        padding-top: 0.75rem;
    }
    
    .gm-calendar-legend-item {
        gap: 0.375rem;
    }
    
    .gm-calendar-legend-icon {
        width: 0.875rem;
        height: 0.875rem;
    }
    
    .gm-calendar-legend-icon .material-symbols-outlined {
        font-size: 0.5rem;
    }
    
    .gm-calendar-legend-text {
        font-size: 0.6875rem;
    }
}

.gm-habit-tracker-wrapper.gm-admin-page {
    background-color: transparent !important;
}

/* Additional resets to prevent WordPress theme interference */
.gm-habit-tracker-wrapper table,
.gm-habit-tracker-wrapper table * {
    border-collapse: separate !important;
    border-spacing: 0 !important;
}

.gm-habit-tracker-wrapper fieldset {
    border: none !important;
    margin: 0 !important;
    padding: 0 !important;
}

.gm-habit-tracker-wrapper legend {
    padding: 0 !important;
    margin: 0 !important;
}

/* Calendar Page View Styles */
.gm-calendar-view {
    background-color: rgb(250, 250, 249) !important;
}

.gm-calendar-page-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 2rem;
    padding-bottom: 1.5rem;
    border-bottom: 1px solid #E5E7EB;
}

.gm-calendar-page-container {
    background: white;
    border-radius: 0.75rem;
    padding: 2rem;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.gm-calendar-page-content {
    max-width: 100%;
}

/* Calendar Page View Styles */
.gm-calendar-view {
    background-color: rgb(250, 250, 249) !important;
}

.gm-calendar-page-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 2rem;
    padding-bottom: 1.5rem;
    border-bottom: 1px solid #E5E7EB;
}

.gm-calendar-page-container {
    background: white;
    border-radius: 0.75rem;
    padding: 2rem;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
    width: 100%;
}

.gm-calendar-page-content {
    max-width: 100%;
}

/* Calendar Styles */
.gm-calendar-content {
    padding: 1.5rem;
}

.gm-calendar-nav {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 1.5rem;
}

@media (max-width: 768px) {
    .gm-calendar-nav {
        justify-content: flex-start;
    }
}

.gm-calendar-nav-btn {
    padding: 0.5rem;
    border-radius: 0.5rem;
    border: none;
    background: #F3F4F6;
    color: #6B7280;
    cursor: pointer;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
}

.gm-calendar-nav-btn:hover {
    background: #E5E7EB;
    color: #111818;
}

.gm-calendar-month-year {
    font-size: 1.25rem;
    font-weight: 900;
    color: #111818;
    margin: 0;
}

.gm-calendar-grid {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 0.5rem;
    margin-bottom: 1.5rem;
    width: 100%;
    box-sizing: border-box;
}

.gm-calendar-day-header {
    text-align: center;
    font-size: 0.75rem;
    font-weight: 700;
    color: #6B7280;
    padding: 0.5rem;
    text-transform: uppercase;
}

.gm-calendar-days-container {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 0.5rem;
    grid-column: 1 / -1;
    width: 100%;
    box-sizing: border-box;
}

.gm-calendar-day {
    aspect-ratio: 1;
    border: 1px solid #E5E7EB;
    border-radius: 0.5rem;
    padding: 0.5rem;
    cursor: pointer;
    transition: all 0.2s;
    background: white;
    display: flex;
    flex-direction: column;
    min-height: 80px;
}

.gm-calendar-day.empty {
    border: none;
    background: transparent;
    cursor: default;
}

.gm-calendar-day.today {
    background: rgba(var(--primary-rgb), 0.1);
    border-color: var(--primary-color);
}

.gm-calendar-day:hover:not(.empty) {
    border-color: var(--primary-color);
}

.gm-calendar-day-number {
    font-size: 0.875rem;
    font-weight: 700;
    color: #111818;
    margin-bottom: 0.25rem;
}

.gm-calendar-day.today .gm-calendar-day-number {
    color: var(--primary-color);
}

.gm-calendar-day-events {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
    overflow: hidden;
}

.gm-calendar-event {
    display: flex;
    align-items: center;
    gap: 0.25rem;
    padding: 0.125rem 0.25rem;
    border-radius: 0.25rem;
    border: 1px solid;
    font-size: 0.625rem;
    font-weight: 700;
}

.gm-calendar-event-name {
    flex: 1;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.gm-calendar-event-more {
    font-size: 0.625rem;
    font-weight: 700;
    color: var(--primary-color);
    padding: 0.125rem 0.25rem;
}

.gm-calendar-legend {
    display: flex;
    align-items: center;
    gap: 1.5rem;
    padding-top: 1rem;
    border-top: 1px solid #E5E7EB;
}

.gm-calendar-legend-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.gm-calendar-legend-icon {
    width: 1rem;
    height: 1rem;
    border-radius: 0.25rem;
    border: 1px solid;
    display: flex;
    align-items: center;
    justify-content: center;
}

.gm-calendar-legend-icon.completed {
    background-color: rgba(var(--primary-rgb), 0.2);
    border-color: rgba(var(--primary-rgb), 0.4);
}

.gm-calendar-legend-icon.scheduled {
    background-color: rgba(var(--primary-rgb), 0.1);
    border-color: rgba(var(--primary-rgb), 0.2);
}

.gm-calendar-legend-icon .material-symbols-outlined {
    font-size: 0.625rem;
    color: var(--primary-color);
}

.gm-calendar-legend-text {
    font-size: 0.75rem;
    font-weight: 500;
    color: #6B7280;
}

/* Statistics Modal Styles */
.gm-statistics-content {
    padding: 1.5rem;
}

.gm-statistics-loading {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 3rem;
}

.gm-loading-spinner {
    width: 2rem;
    height: 2rem;
    border: 3px solid #E5E7EB;
    border-top-color: var(--primary-color);
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

.gm-statistics-error {
    padding: 3rem;
    text-align: center;
    color: #6B7280;
}

.gm-statistics-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 1.5rem;
    margin-bottom: 1.5rem;
}

.gm-statistics-habit-info {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.gm-statistics-habit-icon {
    width: 3rem;
    height: 3rem;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.gm-statistics-habit-icon .material-symbols-outlined {
    font-size: 1.5rem;
}

.gm-statistics-habit-name {
    font-size: 1.5rem;
    font-weight: 900;
    color: #111818;
    margin: 0 0 0.25rem 0;
    line-height: 1.2;
}

.gm-statistics-habit-meta {
    font-size: 0.625rem;
    font-weight: 700;
    letter-spacing: 0.05em;
    color: var(--primary-color);
    text-transform: uppercase;
}

.gm-statistics-next-milestone {
    border-radius: 0.75rem;
    padding: 1rem;
    color: white;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    position: relative;
    overflow: hidden;
    flex-shrink: 0;
}

.gm-statistics-next-milestone::after {
    content: '';
    position: absolute;
    right: -1rem;
    top: -2rem;
    width: 6rem;
    height: 6rem;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.2);
}

.gm-statistics-next-milestone-label {
    font-size: 0.75rem;
    font-weight: 700;
    letter-spacing: 0.05em;
    opacity: 0.8;
    margin: 0 0 0.25rem 0;
}

.gm-statistics-next-milestone-name {
    font-size: 1.125rem;
    font-weight: 900;
    margin: 0;
}

.gm-statistics-next-milestone-days {
    text-align: right;
    position: relative;
    z-index: 1;
}

.gm-statistics-next-milestone-number {
    font-size: 1.5rem;
    font-weight: 900;
    margin: 0;
}

.gm-statistics-next-milestone-days-label {
    font-size: 0.625rem;
    font-weight: 700;
    text-transform: uppercase;
    margin: 0;
    opacity: 0.9;
}

.gm-statistics-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 1.5rem;
}

@media (min-width: 1024px) {
    .gm-statistics-grid {
        grid-template-columns: 1fr 1fr;
    }
}

.gm-statistics-streak-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.gm-statistics-streak-card {
    background: #F9FAFB;
    border: 1px solid #E5E7EB;
    border-radius: 0.75rem;
    padding: 1.25rem;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.gm-statistics-streak-header {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.gm-statistics-streak-header .material-symbols-outlined {
    font-size: 0.875rem;
}

.gm-statistics-streak-label {
    font-size: 0.75rem;
    font-weight: 700;
    letter-spacing: 0.05em;
    color: #6B7280;
    margin: 0;
}

.gm-statistics-streak-value {
    font-size: 1.875rem;
    font-weight: 900;
    line-height: 1.2;
    margin: 0;
}

.gm-statistics-streak-value span {
    font-size: 0.875rem;
    font-weight: 700;
    opacity: 0.7;
}

.gm-statistics-section {
    margin-bottom: 1.5rem;
}

.gm-statistics-section-title {
    font-size: 0.875rem;
    font-weight: 900;
    letter-spacing: 0.05em;
    color: #111818;
    margin: 0 0 0.75rem 0;
}

.gm-statistics-calendar {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 0.375rem;
    background: #F9FAFB;
    border: 1px solid #E5E7EB;
    border-radius: 0.75rem;
    padding: 1.25rem;
    margin-bottom: 1rem;
}

.gm-statistics-day {
    aspect-ratio: 1;
    border-radius: 0.5rem;
    padding: 0.375rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 3.125rem;
    gap: 0.125rem;
}

.gm-statistics-day.completed {
    background: var(--primary-color);
}

.gm-statistics-day.missed {
    background: #EF4444;
}

.gm-statistics-day.not-scheduled {
    background: #E5E7EB;
}

.gm-statistics-day-label {
    font-size: 0.5rem;
    font-weight: 700;
    margin: 0;
}

.gm-statistics-day.completed .gm-statistics-day-label,
.gm-statistics-day.missed .gm-statistics-day-label {
    color: white;
}

.gm-statistics-day.not-scheduled .gm-statistics-day-label {
    color: #6B7280;
}

.gm-statistics-day .material-symbols-outlined {
    font-size: 0.625rem;
    color: white;
}

.gm-statistics-legend {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 1rem;
    padding-top: 1rem;
    border-top: 1px solid #E5E7EB;
}

.gm-statistics-legend-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.gm-statistics-legend-color {
    width: 0.75rem;
    height: 0.75rem;
    border-radius: 0.25rem;
}

.gm-statistics-legend-color.completed {
    background: var(--primary-color);
}

.gm-statistics-legend-color.missed {
    background: #EF4444;
}

.gm-statistics-legend-color.not-scheduled {
    background: #E5E7EB;
}

.gm-statistics-legend-item span {
    font-size: 0.625rem;
    font-weight: 700;
    color: #6B7280;
}

.gm-statistics-milestones-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1rem;
}

.gm-statistics-milestone {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
    padding: 1rem;
    border-radius: 0.75rem;
    border: 1px solid #E5E7EB;
    background: #F9FAFB;
}

.gm-statistics-milestone.locked {
    opacity: 0.6;
    border-style: dashed;
    border-color: #D1D5DB;
}

.gm-statistics-milestone-icon {
    width: 3rem;
    height: 3rem;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(var(--primary-rgb), 0.1);
}

.gm-statistics-milestone.locked .gm-statistics-milestone-icon {
    background: #F3F4F6;
}

.gm-statistics-milestone-icon .material-symbols-outlined {
    font-size: 1.5rem;
    color: var(--primary-color);
}

.gm-statistics-milestone.locked .gm-statistics-milestone-icon .material-symbols-outlined {
    color: #9CA3AF;
}

.gm-statistics-milestone-label {
    font-size: 0.625rem;
    font-weight: 700;
    text-align: center;
    color: #111818;
    margin: 0;
    line-height: 1.2;
}

.gm-statistics-milestone.locked .gm-statistics-milestone-label {
    color: #9CA3AF;
}

/* Prevent WordPress admin bar or theme overlays */
.gm-habit-tracker-wrapper {
    position: relative !important;
    z-index: 1 !important;
}
