/* --- SECTION 1: FONTS & ORIGINAL WRAPPER --- */
@font-face {   
    font-family: KrutiDev010;
    src: url(https://indiatyping.com/krutidev-typing/font/k010.woff);
}

#wrapper { 
    width: 100%; max-width: 800px; margin: auto; position: relative; 
    --primary: #007bff; --success: #28a745; font-family: sans-serif; 
    padding: 12px; background: #F5F5F5; border-radius: 4px; border: 1px solid #d1d5db; line-height: 24px;
}

#wrapper .desktop-hide { display: none !important; }

/* --- SECTION 2: TOP NAVIGATION (ORIGINAL) --- */
#wrapper .top-nav { display: flex; flex-wrap: wrap; gap: 0px; margin-bottom: 10px; border-bottom: 1px solid #ddd; }
#wrapper .top-nav span { font-size: 16px; border: 1px solid transparent; margin-bottom: -1px; }

#wrapper .menu2 { padding: 5px 10px; background-color: #8e9297 !important; color: #000 !important;  border-radius: 4px 4px 0 0; font-weight: bold; margin-right: 2px;}
#wrapper .menu1 { padding: 5px 10px; background-color: #f8f8f8; border: 1px solid #ddd !important; border-radius: 4px 4px 0 0; margin-right: 2px; margin-left: 2px; }
#wrapper .menu1 a { color: #4169e1; text-decoration: none; font-weight: 600; }
#wrapper .menu1:hover { background-color: #ccc; }

/* Fix for Top Menu SVG sizes */
#wrapper .top-nav svg { width: 16px !important; height: 16px !important; vertical-align: middle; fill: currentColor; }

/* --- SECTION 3: QUILL EDITOR & ALIGNMENT FIXES --- */
#wrapper .editor-container {
    position: relative; /* Context for the counter */
    width: 100%;
}

#wrapper .toolbar { 
    display: flex; gap: 10px; align-items: center; justify-content: space-between;
    padding: 5px 15px; color: #FFF; font-weight: bold; font-size: 16px;
    background: #8e9297; border-radius: 4px 4px 0 0;
}
#wrapper .ql-toolbar.ql-snow { background: #fff !important; border: 1px solid #d1d5db !important; border-top: none !important; border-bottom: none !important; }
.ql-container.ql-snow { height: 250px !important; border: 1px solid #d1d5db !important; border-radius: 0 0 4px 4px !important; background: #fff; font-size: 24px !important; }

#wrapper .ql-editor { 
    min-height: 100% !important; font-family: 'KrutiDev010' !important; padding: 22px !important; 
    line-height: 1.6 !important; color: #1a1a1a !important; outline: none; overflow-y: auto;
    counter-reset: list-0;
}

#wrapper .ql-editor p {
    font-family: 'KrutiDev010' !important;
	font-size:24px;
	font-weight: bold;
}

#wrapper .ql-editor h1 {
    font-family: 'KrutiDev010' !important;
}
#wrapper .ql-editor h2 {
    font-family: 'KrutiDev010' !important;
}
#wrapper .ql-editor h3 {
    font-family: 'KrutiDev010' !important;
}
/* Vertical Alignment Fix for KrutiDev Lists */
#wrapper .ql-editor li { display: flex !important; align-items: flex-start !important; padding-left: 0 !important; }
#wrapper .ql-editor li::before {
    font-family: Arial, sans-serif !important; font-size: 18px !important;
    width: 35px !important; margin-right: 10px !important; text-align: right !important;
    position: relative; top: 8px; /* Nudge number down */
}
#wrapper.ql-editor [data-list="ordered"] { counter-increment: list-0; }
#wrapper .ql-editor [data-list="ordered"]::before { content: counter(list-0) "\00a0\00a0" !important; }
#wrapper .ql-editor [data-list="bullet"]::before { content: "\2022\00a0\00a0" !important; top: 6px; }
#wrapper .ql-editor .ql-ui { display: none !important; }

/* --- SECTION 4: ACTION BUTTONS (DESKTOP: TEXT ONLY) --- */
#wrapper .action-toolbar { display: flex; margin: 12px 0px; gap: 6px; width: 100%; justify-content: center; }
#wrapper .action-btn {
    flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center;
    background: #8e9297; border: 1px solid rgba(255, 255, 255, 0.2);
    box-shadow: 0 2px 4px rgba(0,0,0,0.2); border-radius: 4px; padding: 10px 2px;
    color: white; cursor: pointer; position: relative; transition: all 0.1s ease;
}
#wrapper .action-btn:hover { background: #286090; }

/* Desktop: Show Text, Hide Icons */
#wrapper .btn-text { display: block; font-size: 13px; line-height: 1.1; font-weight: 500; }
#wrapper .action-btn svg { display: none; width: 20px !important; height: 20px !important; fill: currentColor; }

/* --- SECTION 5: CHARACTER GRIDS (ORIGINAL) --- */
#wrapper .alt-grid-full { display: grid; grid-template-columns: repeat(auto-fill, minmax(85px, 1fr)); gap: 8px; }
#wrapper .alt-item { text-align: center; border: 1px solid #eee; padding: 8px 2px; border-radius: 4px; cursor: pointer; transition: 0.2s; }
#wrapper .alt-item:hover { border-color: #337ab7; background: #eef7ff !important; transform: translateY(-2px); }
#wrapper .alt-f { font-family: 'KrutiDev010' !important; font-size: 26px; color: #000; display: block; margin-bottom:5px; }
#wrapper .alt-c { font-family: Arial, sans-serif; font-size: 10px; color: #666; font-weight: bold; margin-top: 4px; }
#wrapper .alt-header-special {
        font-family: Arial, sans-serif;
        font-size: 16px;
        color: #337ab7;
        margin: 20px 0 10px 0;
        border-left: 4px solid #337ab7;
        padding-left: 10px;
        font-weight: bold;
    }
	
	/* Tooltip (Original Tooltip Logic) */
#wrapper .action-btn::after {
    content: attr(data-title); position: absolute; bottom: 120%; left: 50%;
    transform: translateX(-50%) translateY(10px); background: rgba(0, 0, 0, 0.85);
    color: #fff; padding: 6px 10px; border-radius: 4px; font-size: 11px;
    opacity: 0; visibility: hidden; transition: all 0.2s ease; z-index: 100; white-space: nowrap;
}
#wrapper .action-btn:hover::after { opacity: 1; visibility: visible; transform: translateX(-50%) translateY(0); }

#wrapper #counter-overlay {
    position: absolute;
    top: 41px;      /* Pins to bottom instead of top */
    right: 15px;       /* Aligns to right */
    font-size: 12px;
    color: #666;
    background: rgba(255, 255, 255, 0.9); /* Semi-transparent white */
    padding: 3px 10px;
    border: 1px solid #ddd;
    border-radius: 4px;
    z-index: 10;       /* Above editor but below tooltips */
    pointer-events: none; /* Allows clicking through to the editor */
    font-family: Arial, sans-serif;
	line-height: 16px;
}

/* --- SECTION 6: RESPONSIVE (MOBILE: ICONS ONLY) --- */
@media (max-width: 650px) {
	#wrapper .mobile-hide { display: none !important; }
	#wrapper .desktop-hide { display: flex !important; }
    #wrapper .btn-text { display: none; }
    #wrapper .action-btn svg { display: block !important; width: 22px !important; height: 22px !important; }
    #wrapper .action-btn { padding: 12px 0; }
    
    /* Long-press Tooltip */
    #wrapper .action-btn:active::after { opacity: 1; visibility: visible; transform: translateX(-50%) translateY(0); }
    
    #wrapper .ql-editor { font-size: 20px !important; padding: 15px !important; }
	
	#wrapper .menu2 { padding: 5px 7px; font-weight: bold; margin-right: 2px;}
	#wrapper .menu1 { padding: 5px 7px; margin-right: 2px; margin-left: 2px; }
	#wrapper .top-nav span { font-size: 15px;}
	
	#wrapper #counter-overlay {
    position: absolute;
    top: 54px;      /* Pins to bottom instead of top */
    right: 1px;       /* Aligns to right */
    padding: 3px 5px;
	}
}


