/* Fine-tune mobile display for smallest screens */
@media (max-width: 350px) {
    .header-button {
        padding: 0.2rem 0.375rem;
        font-size: 0.7rem;
    }
    
    .note-input {
        width: 80px;
        height: 24px;
        padding: 0.2rem 0.375rem;
        font-size: 0.7rem;
    }
    
    header a.text-white {
        font-size: 0.9rem !important;
    }
}/* Header consistent button styles */
.header-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.25rem 0.5rem;
    border-radius: 0.375rem;
    font-size: 0.75rem;
    font-weight: 500;
    text-align: center;
    transition: all 0.2s;
}

/* Input styles to match buttons */
.note-input {
    height: 28px;
    width: 100px;
    padding: 0.25rem 0.5rem;
    border: 1px solid #e2e8f0;
    font-size: 0.75rem;
}

/* Consistent sizing for all header elements in mobile */
@media (max-width: 640px) {
    /* Make all header buttons and input consistent in height */
    .header-button,
    .note-input {
        height: 32px;
        padding: 0.25rem 0.5rem;
        font-size: 0.75rem;
    }
    
    /* Adjust input width to be more compact on mobile */
    .note-input {
        width: 100px;
        max-width: 100px;
    }
    
    /* Ensure container has consistent spacing */
    header .container {
        padding: 0.75rem 1rem;
    }
    
    /* Adjust spacing between elements */
    header .flex.items-center.gap-1,
    header .flex.items-center.gap-2 {
        gap: 0.5rem !important;
    }
    
    /* Ensure flex container works properly */
    header .flex.items-center {
        display: flex;
        align-items: center;
        justify-content: space-between;
    }
}

/* Extra small device adjustments */
@media (max-width: 375px) {
    .header-button,
    .note-input {
        height: 28px;
        padding: 0.2rem 0.4rem;
        font-size: 0.7rem;
    }
    
    .note-input {
        width: 80px;
        max-width: 80px;
    }
}
@media (max-width: 350px) {
    /* Logo and brand */
    header a.text-white {
        font-size: 0.9rem !important;
    }
    
    /* Buttons */
    header button {
        padding: 0.15rem 0.25rem !important;
        font-size: 0.7rem !important;
    }
    
    /* Icons */
    header i.fas, 
    header i.fab {
        font-size: 0.7rem !important;
    }
    
    /* Input field */
    #goto-input {
        width: 90px !important;
        padding: 0.2rem 0.4rem !important;
        font-size: 0.7rem !important;
    }
    
    /* Adjust container and flex spacing */
    header .container {
        padding: 0.5rem !important;
    }
    
    header .flex.items-center {
        flex-wrap: nowrap !important;
    }
}/* Extra small mobile adjustments */
@media (max-width: 375px) {
    /* Header buttons */
    header button {
        padding: 0.2rem 0.4rem !important;
        font-size: 0.75rem !important;
    }
    
    /* Go to note input */
    header input[type="text"] {
        font-size: 0.75rem !important;
        padding: 0.25rem 0.5rem !important;
        height: 1.75rem !important;
    }
    
    /* Reduce logo size */
    header a.text-white.text-xl {
        font-size: 1rem !important;
    }
    
    /* Reduce icon sizes */
    header i.fas, 
    header i.fab {
        font-size: 0.75rem !important;
    }
    
    /* Better horizontal spacing */
    header .flex.items-center.gap-2 {
        gap: 0.25rem !important;
    }
    
    /* Banners */
    .ad-space {
        padding: 0.75rem 0.5rem 0.75rem !important;
        min-height: 40px !important;
    }
    
    .ad-space p {
        font-size: 0.7rem !important;
        margin-bottom: 0.125rem !important;
    }
    
    /* WhatsApp button */
    .whatsapp-btn {
        padding: 0.125rem 0.25rem !important;
        font-size: 0.65rem !important;
        margin-top: 0.25rem !important;
    }
}/* Footer styling */
footer {
    display: flex;
    align-items: center;
}

footer .flex-wrap {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    align-items: center;
}

footer a {
    text-decoration: none !important;
    margin: 0 4px;
}

footer a:hover {
    text-decoration: none;
    opacity: 0.9;
}

@media (max-width: 768px) {
    footer .flex-wrap {
        justify-content: center;
        text-align: center;
    }
    
    footer .flex-wrap > * {
        width: 100%;
        justify-content: center;
        text-align: center;
        margin-bottom: 8px;
    }
}/* Remove focus rings from all elements */
input:focus, 
button:focus, 
textarea:focus, 
select:focus {
    outline: none !important;
    box-shadow: none !important;
    border-color: #e2e8f0 !important;
}

input[type="text"]:focus,
input[type="password"]:focus {
    border-color: #e2e8f0 !important;
}/* Remove the resize handle styles *//* Base Styles */
body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

.bg-gradient {
    background: linear-gradient(135deg, #1E429F 0%, #1A56DB 100%);
}

/* Editor Height Settings */
.editor-height {
    height: 820px; /* Fixed default height */
    min-height: 150px;
    box-sizing: border-box;
}

/* Status Messages */
.status-message {
    transition: opacity 0.5s ease-in-out;
}

/* Password Modal */
.password-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: rgba(0, 0, 0, 0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 50;
}

.password-modal {
    background-color: white;
    border-radius: 0.5rem;
    padding: 2rem;
    max-width: 90%;
    width: 400px;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.2);
}

/* Ad Space */
.ad-space {
    border: 1px dashed #4a5568;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-direction: column;
    text-align: center;
    padding: 1.5rem 1rem 1.5rem; /* More padding on top and bottom */
    border-radius: 0.5rem;
    background-color: #f8fafc;
    margin: 0.5rem 0; /* Add margin inside the container */
}

/* WhatsApp Button */
.whatsapp-btn {
    background-color: #25D366;
    color: white;
    padding: 0.25rem 0.5rem;
    border-radius: 0.25rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 0.75rem;
    font-weight: 600;
    transition: all 0.2s;
    margin-top: 0.5rem; /* Add space above button */
    margin-bottom: 0.25rem; /* Add space below button */
}

.whatsapp-btn:hover {
    background-color: #128C7E;
}

/* Donate Button */
.donation-btn {
    background-color: #F59E0B;
    color: white;
    padding: 0.75rem 1.5rem;
    border-radius: 0.5rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    transition: all 0.2s;
}

.donation-btn:hover {
    background-color: #D97706;
}

/* Save Indicator */
.save-indicator {
    position: absolute;
    top: 0.75rem;
    right: 0.75rem;
    display: flex;
    align-items: center;
    padding: 0.25rem 0.5rem;
    border-radius: 0.25rem;
    background-color: rgba(255, 255, 255, 0.8);
    font-size: 0.75rem;
    transition: opacity 0.5s ease-in-out;
    z-index: 10;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
    max-width: 90%;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

/* Copy Button */
.copy-button {
    position: absolute;
    bottom: 0.75rem;
    right: 0.75rem;
    padding: 0.5rem;
    background-color: rgba(255, 255, 255, 0.9);
    border-radius: 0.25rem;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s;
    z-index: 10;
    border: 1px solid #e2e8f0;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.copy-button:hover {
    background-color: #f1f5f9;
}

.copy-tooltip {
    position: absolute;
    bottom: 3rem;
    right: 0.75rem;
    padding: 0.25rem 0.5rem;
    background-color: #1E429F;
    color: white;
    font-size: 0.75rem;
    border-radius: 0.25rem;
    opacity: 0;
    transition: opacity 0.3s ease-in-out;
    z-index: 20;
}

.copy-tooltip.show {
    opacity: 1;
}

/* Editor Layout */
.editor-container {
    display: flex;
    position: relative;
    width: 100%;
    border: 1px solid #e2e8f0;
    border-radius: 0.375rem;
    overflow: hidden;
    background-color: #fff;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
}

.line-numbers {
    display: none;
    width: 2.5rem;
    padding: 1rem 0.25rem;
    text-align: right;
    color: #64748b;
    background-color: #f8fafc;
    border-right: 1px solid #e2e8f0;
    font-family: 'Menlo', 'Monaco', 'Courier New', monospace;
    user-select: none;
    overflow-y: hidden;
    font-size: 0.875rem;
    line-height: 1.5;
}

.line-numbers.visible {
    display: block;
}

/* Editor With Numbers */
.editor-with-numbers {
    flex: 1;
    overflow-y: auto;
    font-family: inherit;
    padding: 1rem;
    resize: none;
    border: none;
    line-height: 1.5;
    background-color: #fff;
    font-size: 1rem;
    width: 100%;
    outline: none;
    box-sizing: border-box;
}

/* Remove focus border and add white background */
.editor-with-numbers:focus {
    box-shadow: none;
    outline: none;
    border: none;
}

.editor-with-numbers.code-font {
    font-family: 'Menlo', 'Monaco', 'Courier New', monospace;
    font-size: 0.875rem;
}

/* Toggle Switches */
.code-toggle {
    display: flex;
    align-items: center;
    margin-right: 1rem;
}

.toggle-switch {
    position: relative;
    display: inline-block;
    width: 36px;
    height: 18px;
    margin-right: 8px;
}

.toggle-switch input {
    opacity: 0;
    width: 0;
    height: 0;
}

.toggle-slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: #ccc;
    transition: .4s;
    border-radius: 34px;
}

.toggle-slider:before {
    position: absolute;
    content: "";
    height: 14px;
    width: 14px;
    left: 2px;
    bottom: 2px;
    background-color: white;
    transition: .4s;
    border-radius: 50%;
}

input:checked + .toggle-slider {
    background-color: #1C64F2;
}

input:focus + .toggle-slider {
    box-shadow: 0 0 1px #1C64F2;
}

input:checked + .toggle-slider:before {
    transform: translateX(18px);
}

/* Editor Area Wrapper */
.editor-area-wrapper {
    position: relative;
    display: flex;
    flex-direction: column;
    width: 100%;
    min-height: 150px;
    padding: 0; /* Remove unnecessary padding */
}

/* Password Container */
.password-container {
    display: inline-flex;
    align-items: center;
    overflow: hidden;
    max-width: 0;
    opacity: 0;
    transition: max-width 0.3s ease-out, opacity 0.3s ease-out, margin 0.3s ease-out;
}

.password-container.visible {
    max-width: 300px;
    opacity: 1;
    margin-right: 0.5rem;
}

.password-input {
    width: 150px;
    padding: 0.375rem 0.75rem;
    border: 1px solid #e2e8f0;
    border-radius: 0.375rem;
    font-size: 0.875rem;
}

/* Bottom banner spacing */
.bottom-banner-container {
    margin-top: 12px;
    margin-bottom: 12px;
}

/* Footer spacing adjustment */
footer.bg-gradient {
    margin-top: 12px; /* Small space above footer */
    position: relative;
}

/* Main container adjustments */
main.container {
    padding-bottom: 0 !important;
    margin-bottom: 0 !important;
}

/* Preserve existing mobile styles for editor */
@media (max-width: 640px) {
    /* Editor specific styles */
    .editor-height {
        height: 300px; /* Smaller default height on mobile */
        min-height: 150px;
    }
    
    .password-input {
        width: 100%;
        max-width: none;
    }
    
    .editor-with-numbers {
        font-size: 0.9375rem;
        padding: 0.75rem;
    }
    
    .copy-button {
        bottom: 0.5rem;
        right: 0.5rem;
        padding: 0.375rem;
    }
    
    .save-indicator {
        top: 0.5rem;
        right: 0.5rem;
        padding: 0.25rem 0.375rem;
        font-size: 0.6875rem;
    }
    
    .password-container.visible {
        max-height: 50px;
        margin: 0.75rem 0;
    }
    
    .flex.flex-wrap.items-center.gap-2 {
        gap: 0.5rem !important;
        margin-top: 0.5rem;
    }
    
    /* Header improvements */
    header .container {
        padding: 0.75rem 1rem;
    }
    
    header .flex-col {
        gap: 0.75rem;
    }
    
    /* Buttons in header */
    header button {
        padding: 0.25rem 0.5rem;
        font-size: 0.875rem;
    }
    
    /* Input in header */
    header input[type="text"] {
        font-size: 0.875rem;
        padding: 0.375rem 0.75rem;
        height: 2.25rem;
    }
    
    /* Banner ad spaces */
    .ad-space {
        padding: 0.5rem;
        height: auto !important;
        min-height: 60px;
    }
    
    .ad-space p {
        font-size: 0.75rem;
        margin-bottom: 0.25rem;
    }
    
    /* WhatsApp button in ads */
    .whatsapp-btn {
        padding: 0.125rem 0.375rem;
        font-size: 0.7rem;
    }
    
    /* Bottom spacing */
    .bottom-banner-container {
        margin-top: 8px;
        margin-bottom: 8px;
    }
    
    /* Footer for mobile */
    footer {
        padding: 0.75rem 0;
    }
    
    footer .container {
        padding: 0 1rem;
    }
    
    footer .flex-wrap {
        gap: 5px;
    }
    
    footer p, footer a {
        font-size: 0.75rem;
    }
    
    /* Force a single-line layout in footer when possible */
    footer .flex-wrap {
        flex-direction: row;
        flex-wrap: wrap;
        justify-content: space-between;
    }
    
    footer .inline-flex {
        flex-wrap: wrap;
        justify-content: center;
    }
    
    /* Footer social icons */
    footer .gap-4 {
        gap: 0.75rem;
    }
}

/* Medium size screens */
@media (min-width: 641px) and (max-width: 1024px) {
    .editor-height {
        height: 940px; /* Set fixed height for medium screens */
        min-height: 150px;
    }
}