.v-voice-wrapper {
    width: 100%;
    margin: 0 auto;
    box-sizing: border-box;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
	font-size: larger;
}

.v-voice-wrapper * {
    box-sizing: border-box;
}

.v-voice-wrapper .boxed {
    background-color: #B9E5F3;
    width: 100%;
    max-width: 800px;
	padding-left: 10px;
	padding-right: 10px;
	padding-top: 5px;
	padding-bottom: 14px;
    margin: 3px auto;
    border: 1px solid #51A2D9;
    border-radius: 2px;
}

/* ============================================================
   2. HEADER, CONTROLS & DROPDOWNS
   ============================================================ */
.v-voice-wrapper .header-control-row {
    display: flex;
    align-items: center;
    position: relative; /* This is the 'anchor' for the center button */
    min-height: 60px;   /* Ensure enough height for the mic icon */
    width: 100%;
	max-width:772px;
	margin: 0px 0px 0px 4px;
}

.v-voice-wrapper .lang-selection {
    display: flex;
    gap: 8px;
    flex: 1;
	z-index: 1; 
}

/* Modern Select Styling */
.v-voice-wrapper .lang-selection select {
    appearance: none;
    -webkit-appearance: none;
    background-color: #ffffff;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%232a6592' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 12px center;
    background-size: 16px;
    border: 1px solid #51A2D9;
    border-radius: 2px;
    font-size: 14px;
    color: #2a6592;
    font-weight: 500;
 /*   width: 100%; */
    cursor: pointer;
    transition: all 0.3s ease;
	
	
    display: inline-block !important;
    visibility: visible !important;
    opacity: 1 !important;
    min-width: 100px;
	
	padding: 5px 35px 5px 10px;
    line-height: 1.5;

}

@-moz-document url-prefix() {
    .v-voice-wrapper .lang-selection select {
        padding-top: 10px;
        padding-bottom: 10px;
    }
}

.v-voice-wrapper .lang-selection select:focus {
    outline: none;
    border-color: #2a6592;
    box-shadow: 0 0 0 3px rgba(81, 162, 217, 0.2);
}

.v-voice-wrapper #div_start {
   position: absolute;
    left: 50%;
    transform: translateX(-50%);
    z-index: 2;
}
.v-voice-wrapper #start_button { border: 0; background: transparent; cursor: pointer; padding: 0; }

/* ============================================================
   3. TEXT AREAS & SUGGESTION BAR
   ============================================================ */
.v-voice-wrapper #results, 
.v-voice-wrapper #final_span {
    background-color: white;
    font-family: 'Cambria', serif;
    font-size: 20px;
    border: 1px solid #51A2D9;
    padding: 12px;
    width: 100%;
    max-width: 772px;
    margin: 3px auto;
    display: block;
    border-radius: 2px;
}

.v-voice-wrapper #results { min-height: 70px; color: #666; font-size: 20px; }
.v-voice-wrapper #final_span { min-height: 230px; resize: vertical; line-height: 1.6; }

/* --- 5. Suggestion Bar (Mobile Scroll Fix) --- */
.v-voice-wrapper #input_tool_helper {
    background-color: #f9f9f9;
    border: 1px dashed #51A2D9;
    padding: 10px;
    width: 100%;
    max-width: 772px;
    margin: 10px auto;
    border-radius: 4px;
    min-height: 52px;

    /* Fixed Flex Settings */
    display: none;
    align-items: center;
    flex-wrap: nowrap !important;
    gap: 6px;

    overflow-x: scroll !important; 
    overflow-y: hidden;
    white-space: nowrap !important;
    touch-action: pan-x; 
    -webkit-overflow-scrolling: touch;
	font-family: fangsong;
}

.v-voice-wrapper #input_tool_helper::-webkit-scrollbar {
    height: 6px !important;
    display: block !important;
}

.v-voice-wrapper #input_tool_helper::-webkit-scrollbar-thumb {
    background: #51A2D9 !important;
    border-radius: 10px;
}

.v-voice-wrapper #input_tool_helper::-webkit-scrollbar-track {
    background: #e1f0fa; 
}


.v-voice-wrapper .btnSugg {
    height: 30px;
    padding: 0 12px;
    font-size: 14px;
    border: 1px solid #2a6592;
    background: #fff;
    border-radius: 4px;
    cursor: pointer;
    
    /* Ensure buttons stay their full size */
    flex-shrink: 0 !important; 
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.v-voice-wrapper .btnSugg:last-child {
    margin-right: 0 !important;
}

/* ============================================================
   4. BUTTON GRID & TOOLTIPS (Horizontal Alignment)
   ============================================================ */
.v-voice-wrapper .grid-container1 {
    display: grid;
    grid-template-columns: repeat(6, 1fr) !important;
    gap: 6px;
    max-width: 772px;
    margin: 10px auto 0 auto; 
	padding-top:5px;
}

.v-voice-wrapper .btncustom {
    background-color: #2a6592;
    color: white;
    padding: 8px 4px;
    border: none;
    border-radius: 2px;
    cursor: pointer;
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    width: 100%;
    transition: background 0.3s;
    position: relative;
    gap: 5px; 
    min-height: 38px;
    overflow: visible !important;
}

.v-voice-wrapper .btncustom::after {
    content: attr(data-v-title); 
    position: absolute;
    bottom: 130%;
    left: 50%;
    transform: translateX(-50%) scale(0.8);
    background-color: rgba(0, 0, 0, 0.85);
    color: #ffffff;
    padding: 6px 12px;
    border-radius: 2px;
    font-size: 12px;
    white-space: nowrap;
    opacity: 0;
    visibility: hidden;
    transition: all 0.2s ease;
    z-index: 9999;
    pointer-events: none;
}

.v-voice-wrapper .btncustom::before {
    content: '';
    position: absolute;
    bottom: 115%;
    left: 50%;
    transform: translateX(-50%);
    border: 6px solid transparent;
    border-top-color: rgba(0, 0, 0, 0.85);
    opacity: 0;
    visibility: hidden;
    z-index: 9999;
}

.v-voice-wrapper .btncustom.show-v-tip::after,
.v-voice-wrapper .btncustom.show-v-tip::before {
    opacity: 1;
    visibility: visible;
    transform: translateX(-50%) scale(1);
}

.v-voice-wrapper .btncustom i { 
    font-size: 14px; 
    margin-bottom: 0;
}

@media screen and (max-width: 600px) {
    .v-voice-wrapper .btncustom span { 
        display: none !important;
    }
    .v-voice-wrapper .btncustom i { 
        font-size: 18px;
    }
    .v-voice-wrapper .btncustom {
        padding: 10px 0;
        min-height: 44px;
    }
}

/* ============================================================
   5. VOICE COMMANDS GUIDE (INLINE GUIDE)
   ============================================================ */
.v-guide-container { max-width: 772px; margin: 0px auto; }
.v-guide-toggle { width: 100%; padding: 12px; color: white; border: none; border-radius: 2px; cursor: pointer;margin-top: 10px;}

.v-inline-guide {
    display: none;
    background: #ffffff;
    border: 1px solid #2a6592;
    padding-top: 8px;
	padding-left: 20px;
	padding-bottom: 20px;
	padding-right: 20px;
    border-radius: 0 0 2px 2px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
}

.v-guide-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); gap: 20px; }
.v-cat-title { color: #2a6592; border-bottom: 2px solid #B9E5F3; margin-bottom: 10px; padding-bottom: 5px; font-size: 16px; margin-top: 0; }
.v-guide-table { width: 100%; font-size: 13px; border-collapse: collapse; line-height: 24px; }
.v-symbol { text-align: right; font-weight: bold; }
.red-text { color: #d9534f; }
.v-cmd-box { font-size: 13px; background: #f9f9f9; padding: 10px; border-radius: 2px; border: 1px solid #eee; line-height: 20px; }
.v-cmd-sub { color: #2a6592; font-weight: bold; display: block; margin-top: 5px; }
.v-guide-footer { font-size: 12px; color: #666; margin-top: 5px; border-bottom: 1px solid #eee; margin-bottom: 12px; text-align: center; }

/* ============================================================
   6. MEDIA QUERIES (RESPONSIVENESS)
   ============================================================ */
@media screen and (max-width: 600px) {
  /*  .v-voice-wrapper #div_start { order: -1; } */
  
    .v-voice-wrapper .lang-selection { width: 100%; }
    .v-voice-wrapper .btncustom span { display: none !important; }
    .v-voice-wrapper .btncustom i { font-size: 22px; margin-bottom: 0; }
    .v-voice-wrapper .btncustom { padding: 12px 0; }
    .v-voice-wrapper .lang-selection select { padding: 8px 32px 8px 8px; font-size: 15px; }
    .v-guide-grid { grid-template-columns: 1fr; }
}




@media screen and (max-width: 480px) {
	
	.v-voice-wrapper #div_start {position: absolute; left: 85%; transform: translateX(-50%); z-index: 2;}
	.v-voice-wrapper .header-control-row { text-align: center; margin: 0px auto 0px 1px; }
    .v-voice-wrapper .grid-container1 {
   /*     grid-template-columns: repeat(3, 1fr) !important; *//* 3x2 Grid on small phones */
        gap: 4px;
    /*    padding: 5px; */
    }
}

/* ============================================================
   7. PLATFORM SPECIFIC & SCROLLBARS
   ============================================================ */
/* Scrollbar Suggestion Bar */
.v-voice-wrapper #input_tool_helper::-webkit-scrollbar { height: 4px; }
.v-voice-wrapper #input_tool_helper::-webkit-scrollbar-thumb { background: #51A2D9; border-radius: 2px; }

/* Windows 11 / Desktop Enhance */
#win11 .v-voice-wrapper .boxed { border-radius: 2px; backdrop-filter: blur(10px); border: 1px solid rgba(81, 162, 217, 0.5); }
#mac .v-voice-wrapper { -webkit-font-smoothing: antialiased; font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto; }

/* Touch Targets for Mobile OS */
#mobile .v-voice-wrapper .btncustom,
#android .v-voice-wrapper .btncustom,
#ios .v-voice-wrapper .btncustom { min-height: 48px; touch-action: manipulation; }

/* Hide Scrollbar on Mobile */
#mobile .v-voice-wrapper #input_tool_helper::-webkit-scrollbar { display: none; }

/* Desktop & Tablet Layout */
.v-voice-wrapper .typing-stats-wrapper {
	width: 100%;
	max-width: 762px;
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
   /* align-items: center; */
    font-size: 14px;
    padding: 12px 4px 0px 4px; /* Top Right Bottom Left */
}

.v-voice-wrapper .transliteration-toggle {
    margin-bottom: 5px;
}

.v-voice-wrapper .stats-counter {
    display: flex;
    align-self: self-end;
}

.v-voice-wrapper .stats-counter .separator {
    color: #ccc;
    margin: 0 4px;
}

/* Mobile Responsiveness */
@media screen and (max-width: 600px) {
    .typing-stats-wrapper {
        flex-direction: column;
        align-items: flex-start; /* Aligns both to the left on mobile */
     /*   gap: 8px;
        margin-left: 10px; */
    }
    
    .stats-counter {
        font-weight: 500;
        color: #555;
    }
}

