/* WordPress Isolation and Reset */
#tgai-app {
    all: initial;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    box-sizing: border-box;
    display: block;
}
#tgai-app *, #tgai-app *::before, #tgai-app *::after {
    all: unset;
    box-sizing: border-box;
    display: revert;
}
/* App-specific styles */
        /* Todo widget styles */
        /* WordPress Todo Widget Styles - Scoped to #todo-widget-8419 */
        #todo-widget-8419 {
            /* STRONG WordPress theme isolation */
            all: initial !important;
            font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif !important;
            line-height: 1.6 !important;
            font-size: 16px !important;
            color: #333 !important;
            background: #f0fdf4 !important;
            padding: 1rem !important;
            border-radius: 8px !important;
            margin: 1rem 0 !important;
            display: block !important;
            box-sizing: border-box !important;
        }
        #todo-widget-8419 * {
            margin: 0 !important;
            padding: 0 !important;
            box-sizing: border-box !important;
        }
        #todo-widget-8419 .app-container {
            max-width: 1200px !important;
            margin: 0 auto !important;
            display: block !important;
        }
        #todo-widget-8419 .header-section {
            text-align: center !important;
            margin-bottom: 1.5rem !important;
            padding: 1rem !important;
            background: white !important;
            border-radius: 8px !important;
            box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1) !important;
            display: block !important;
        }
        #todo-widget-8419 .app-title {
            font-size: 1.6rem !important;
            font-weight: 600 !important;
            color: #10b981 !important;
            margin-bottom: 0.5rem !important;
            line-height: 1.2 !important;
            display: block !important;
        }
        #todo-widget-8419 .app-description {
            font-size: 0.95rem !important;
            color: #34d399 !important;
            max-width: 600px !important;
            margin: 0 auto !important;
            line-height: 1.4 !important;
            display: block !important;
        }
        #todo-widget-8419 .main-content {
            background: white !important;
            border-radius: 8px !important;
            padding: 1rem !important;
            box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1) !important;
            border: 1px solid #e1e8ed !important;
            display: flex !important;
            justify-content: center !important;
            align-items: center !important;
            min-height: 200px !important;
        }
        /* Responsive design */
        @media (max-width: 768px) {
            #todo-widget-8419 {
                padding: 0.75rem !important;
            }
            #todo-widget-8419 .app-title {
                font-size: 1.4rem !important;
            }
            #todo-widget-8419 .header-section, 
            #todo-widget-8419 .main-content {
                padding: 0.75rem !important;
            }
        }
/* Todo App Specific Styles - Mobile First & RTL Responsive Design */
#todo-widget-8419 .todo-container {
    max-width: 800px;
    margin: 0 auto;
    padding: 1rem;
    background: #f0fdf4 !important;
    min-height: 100vh;
    direction: ltr;
}
/* RTL text alignment */
[dir="rtl"] #todo-widget-8419 .todo-container,
[dir="rtl"] #todo-widget-8419 .todo-label,
[dir="rtl"] #todo-widget-8419 .stat-label,
[dir="rtl"] #todo-widget-8419 .progress-title {
    text-align: right;
}
.todo-header {
    text-align: center;
    padding: 2rem 1rem;
    background: linear-gradient(135deg, #10b981 0%,
                                #059669 100%);
    border-radius: 20px;
    margin-bottom: 2rem;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.15);
    animation: slideDown 0.6s ease;
}
@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}
.todo-title {
    color: white;
    font-size: clamp(1.75rem, 5vw, 2.5rem);
    font-weight: 800;
    margin: 0 0 0.5rem 0;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.2);
    letter-spacing: -0.5px;
}
.todo-description {
    color: rgba(255, 255, 255, 0.95);
    font-size: clamp(0.95rem, 2.5vw, 1.1rem);
    margin: 0;
    font-weight: 400;
}
.progress-section {
    background: white;
    border-radius: 16px;
    padding: 1.5rem;
    margin-top: 2rem;
    margin-bottom: 2rem;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.08);
    animation: fadeIn 0.8s ease;
}
.progress-title {
    text-align: center;
    color: #10b981;
    font-size: clamp(1.5rem, 4vw, 2rem);
    font-weight: 700;
    margin: 0 0 1.5rem 0;
}
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: scale(0.95);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}
.progress-stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(100px, 1fr));
    gap: 1rem;
    margin-bottom: 1.5rem;
}
.stat-item {
    text-align: center;
    padding: 0.75rem;
    background: linear-gradient(
        135deg, #10b98115 0%, #05966910 100%);
    border-radius: 12px;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}
.stat-item:hover {
    transform: translateY(-3px);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.1);
}
.stat-value {
    display: block;
    font-size: clamp(1.75rem, 4vw, 2.25rem);
    font-weight: 800;
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 0.25rem;
}
.stat-label {
    display: block;
    font-size: clamp(0.8rem, 2vw, 0.9rem);
    color: #64748b;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}
.progress-bar-container {
    position: relative;
}
.progress-bar {
    width: 100%;
    height: 50px;
    background: #e2e8f0;
    border-radius: 25px;
    overflow: hidden;
    position: relative;
    box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.1);
}
.progress-fill {
    height: 100%;
    background: linear-gradient(90deg, #10b981 0%, #059669 100%);
    border-radius: 25px;
    transition: width 0.6s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
}
.progress-fill::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    bottom: 0;
    right: 0;
    background: linear-gradient(
        90deg,
        transparent,
        rgba(255, 255, 255, 0.3),
        transparent
    );
    animation: shimmer 2s infinite;
}
@keyframes shimmer {
    0% {
        transform: translateX(-100%);
    }
    100% {
        transform: translateX(100%);
    }
}
.progress-text {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-weight: 700;
    font-size: clamp(1rem, 3vw, 1.25rem);
    color: #1e293b;
    text-shadow: 0 1px 2px rgba(255, 255, 255, 0.8);
    z-index: 1;
}
#todo-widget-8419 .todo-list {
    background: white !important;
    border-radius: 16px !important;
    padding: 1rem !important;
    margin-bottom: 2rem !important;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.08) !important;
}
#todo-widget-8419 .todo-item {
    padding: 0.625rem !important;
    margin-bottom: 0.375rem !important;
    background: #f8fafc !important;
    border-radius: 12px !important;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1) !important;
    border: 2px solid transparent !important;
    border-bottom: 1px solid #e2e8f0 !important;
    position: relative !important;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05) !important;
}
#todo-widget-8419 .todo-item:hover {
    background: #f1f5f9 !important;
    border-color: #10b98130 !important;
    transform: translateX(5px) !important;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08) !important;
}
/* RTL Support for hover effect */
[dir="rtl"] #todo-widget-8419 .todo-item:hover {
    transform: translateX(-5px) !important;
}
#todo-widget-8419 .todo-item.completed {
    background: linear-gradient(
        135deg, #10b98110 0%, #05966908 100%) !important;
    border-color: #10b98140 !important;
}
#todo-widget-8419 .todo-item.completed .todo-label {
    text-decoration: line-through !important;
    opacity: 0.7 !important;
    color: #64748b !important;
}
.todo-checkbox-container {
    display: flex;
    align-items: center;
    cursor: pointer;
    user-select: none;
    position: relative;
    padding-left: 0;
    font-size: clamp(0.95rem, 2.5vw, 1.1rem);
    line-height: 1.6;
    gap: 16px;
}
.todo-checkbox-container input {
    position: absolute;
    opacity: 0;
    cursor: pointer;
    height: 0;
    width: 0;
}
/* Checkbox visual indicator (empty box) */
.checkmark-box {
    flex-shrink: 0;
    height: 24px;
    width: 24px;
    background-color: white;
    border: 3px solid #cbd5e1;
    border-radius: 8px;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}
.todo-checkbox-container:hover .checkmark-box {
    border-color: #10b981;
    box-shadow: 0 0 0 4px #10b98115;
}
.todo-checkbox-container input:checked ~ .checkmark-box {
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
    border-color: #10b981;
}
/* Checkmark icon at end of sentence */
.checkmark-icon {
    flex-shrink: 0;
    margin-left: auto;
    font-size: 1.5rem;
    font-weight: bold;
    color: #10b981;
    opacity: 0;
    transform: scale(0);
    transition: all 0.3s cubic-bezier(0.68, -0.55, 0.265, 1.55);
}
/* RTL Support */
[dir="rtl"] .checkmark-icon {
    margin-left: 0;
    margin-right: auto;
}
.todo-checkbox-container input:checked ~ .checkmark-icon {
    opacity: 1;
    transform: scale(1);
}
@keyframes checkBounce {
    0%, 100% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.2);
    }
}
.todo-label {
    flex: 1;
    font-weight: 500;
    color: #1e293b;
    transition: all 0.3s ease;
    word-break: break-word;
    text-align: left;
}
/* RTL label alignment */
[dir="rtl"] .todo-label {
    text-align: right;
}
.action-buttons {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
    gap: 1rem;
    margin-top: 3rem;
    padding-top: 2.5rem;
    border-top: 2px solid #e2e8f0;
}
.btn {
    padding: 1rem 1.5rem;
    border: none;
    border-radius: 12px;
    font-size: clamp(0.9rem, 2.5vw, 1rem);
    font-weight: 700;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}
.btn:active {
    transform: scale(0.95);
}
.btn-primary {
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
    color: white;
}
.btn-primary:hover {
    box-shadow: 0 8px 20px #10b98140;
    transform: translateY(-2px);
}
.btn-secondary {
    background: white;
    color: #10b981;
    border: 2px solid #10b981;
}
.btn-secondary:hover {
    background: #10b981;
    color: white;
    transform: translateY(-2px);
}
.celebration {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.8);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    animation: fadeIn 0.5s ease;
    cursor: pointer;
}
.celebration-content {
    background: white;
    padding: 3rem 2rem;
    border-radius: 24px;
    text-align: center;
    max-width: 90%;
    position: relative;
    animation: bounceIn 0.6s cubic-bezier(0.68, -0.55, 0.265, 1.55);
    cursor: default;
}
.celebration-close {
    position: absolute;
    top: 1rem;
    right: 1rem;
    background: transparent;
    border: none;
    font-size: 2rem;
    line-height: 1;
    color: #64748b;
    cursor: pointer;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    padding: 0;
    z-index: 10;
}
.celebration-close:hover {
    background: #f1f5f9;
    color: #1e293b;
    transform: rotate(90deg);
}
.celebration-close:active {
    transform: rotate(90deg) scale(0.9);
}
/* RTL Support for close button */
[dir="rtl"] .celebration-close {
    right: auto;
    left: 1rem;
}
@keyframes bounceIn {
    0% {
        opacity: 0;
        transform: scale(0.3);
    }
    50% {
        transform: scale(1.05);
    }
    100% {
        opacity: 1;
        transform: scale(1);
    }
}
.celebration-emoji {
    font-size: clamp(4rem, 15vw, 6rem);
    margin-bottom: 1rem;
    animation: rotate 1s ease-in-out infinite;
}
@keyframes rotate {
    0%, 100% {
        transform: rotate(-10deg);
    }
    50% {
        transform: rotate(10deg);
    }
}
.celebration-title {
    color: #10b981;
    font-size: clamp(1.75rem, 5vw, 2.5rem);
    margin: 0 0 0.5rem 0;
    font-weight: 800;
}
.celebration-content p {
    color: #64748b;
    font-size: clamp(1rem, 3vw, 1.25rem);
    margin: 0;
}
.particle {
    position: fixed;
    width: 10px;
    height: 10px;
    background: #34d399;
    border-radius: 50%;
    pointer-events: none;
    animation: particleFloat 1s ease-out forwards;
    z-index: 999;
}
@keyframes particleFloat {
    to {
        transform: translate(var(--tx), var(--ty));
        opacity: 0;
    }
}
.confetti {
    position: fixed;
    width: 10px;
    height: 10px;
    top: -10px;
    z-index: 999;
    pointer-events: none;
    animation: confettiFall linear forwards;
}
@keyframes confettiFall {
    to {
        transform: translateY(100vh) rotate(720deg);
        opacity: 0;
    }
}
/* Mobile optimizations */
@media (max-width: 768px) {
    .todo-container {
        padding: 0.75rem;
    }
    .todo-header {
        padding: 1.5rem 1rem;
        border-radius: 16px;
    }
    .progress-section {
        padding: 1rem;
    }
    .todo-item {
        padding: 0.5rem !important;
        margin-bottom: 0.3rem !important;
    }
    .btn {
        padding: 0.875rem 1.25rem;
    }
}
/* Accessibility improvements */
@media (prefers-reduced-motion: reduce) {
    * {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}
/* Print styles */
@media print {
    .action-buttons,
    .celebration {
        display: none !important;
    }
    .todo-container {
        box-shadow: none;
    }
}