/* ===== Base Styles ===== */
.notepad-container-fixed {
    max-width: 900px;
    margin: 30px auto;
    padding: 0;
    background: #ffffff;
    border-radius: 12px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.08);
    overflow: hidden;
    font-family: 'Segoe UI', 'Roboto', 'Helvetica Neue', sans-serif;
    border: 1px solid #f0e6ea;
}

/* ===== Header Styles ===== */
.notepad-header-fixed {
    background: linear-gradient(135deg, #ff7eb3 0%, #ff758c 100%);
    color: white;
    padding: 18px 25px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    box-shadow: 0 2px 10px rgba(255, 119, 142, 0.2);
}

.notepad-header-fixed h2 {
    margin: 0;
    font-size: 1.8rem;
    font-weight: 600;
    letter-spacing: 0.5px;
    text-shadow: 0 1px 2px rgba(0,0,0,0.1);
}

.notepad-actions-fixed {
    display: flex;
    gap: 12px;
}

.notepad-btn-fixed {
    padding: 10px 18px;
    background: rgba(255, 255, 255, 0.2);
    color: white;
    border: 1px solid rgba(255, 255, 255, 0.3);
    border-radius: 8px;
    cursor: pointer;
    font-weight: 500;
    font-size: 0.95rem;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 6px;
}

.notepad-btn-fixed:hover {
    background: rgba(255, 255, 255, 0.3);
    transform: translateY(-1px);
}

/* ===== Toolbar Styles ===== */
.notepad-toolbar-fixed {
    background: #fafafa;
    padding: 10px 20px;
    display: flex;
    flex-wrap: nowrap; /* Changed to nowrap */
    gap: 8px;
    align-items: center;
    border-bottom: 1px solid #f0f0f0;
    overflow-x: auto; /* Allows horizontal scrolling if needed */
    white-space: nowrap; /* Prevents wrapping */
}

.notepad-toolbar-fixed select,
.notepad-toolbar-fixed input[type="color"] {
    padding: 8px 12px;
    border: 1px solid #e0e0e0;
    border-radius: 6px;
    background: white;
    font-size: 0.9rem;
    transition: all 0.2s;
    min-width: 120px; /* Ensures consistent width */
}

.notepad-toolbar-fixed select:focus,
.notepad-toolbar-fixed input[type="color"]:focus {
    outline: none;
    border-color: #ff7eb3;
    box-shadow: 0 0 0 3px rgba(255, 126, 179, 0.2);
}

.tool-btn-fixed {
    padding: 8px 12px;
    background: white;
    border: 1px solid #e0e0e0;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.2s;
    font-size: 0.95rem;
    color: #555;
    min-width: 40px; /* Fixed width for buttons */
    text-align: center;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    height: 36px; /* Fixed height */
}

.tool-btn-fixed:hover {
    background: #f5f5f5;
    border-color: #d0d0d0;
    color: #333;
}

.tool-btn-fixed strong,
.tool-btn-fixed em {
    font-style: normal;
    font-weight: bold;
}

#text-color-fixed {
    width: 40px;
    height: 36px;
    padding: 2px;
    cursor: pointer;
}

/* ===== Content Area ===== */
.notepad-content-fixed {
    min-height: 400px;
    padding: 25px;
    outline: none;
    line-height: 1.6;
    font-size: 1.05rem;
    color: #333;
    background: white;
    border: none;
    resize: none;
    overflow-y: auto;
    transition: background 0.3s;
}

.notepad-content-fixed:focus {
    background: #fefefe;
}

/* ===== Footer Styles ===== */
.notepad-footer-fixed {
    background: #fafafa;
    padding: 12px 25px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    color: #888;
    font-size: 0.85rem;
    border-top: 1px solid #f0f0f0;
}

/* ===== Share Modal ===== */
.share-modal-fixed {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    z-index: 9999;
    backdrop-filter: blur(3px);
}

.modal-content-fixed {
    background: white;
    margin: 10vh auto;
    padding: 25px;
    width: 90%;
    max-width: 500px;
    border-radius: 12px;
    position: relative;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.15);
}

.modal-content-fixed h3 {
    margin: 0 0 20px 0;
    color: #ff758c;
    font-size: 1.4rem;
}

.close-modal-fixed {
    position: absolute;
    top: 15px;
    right: 20px;
    font-size: 1.8rem;
    cursor: pointer;
    color: #aaa;
    transition: color 0.2s;
}

.close-modal-fixed:hover {
    color: #ff758c;
}

.share-options-fixed {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
    margin-bottom: 25px;
}

.share-option-fixed {
    padding: 12px;
    background: #fafafa;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-size: 0.95rem;
    color: #555;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.share-option-fixed:hover {
    background: #f0f0f0;
    color: #ff758c;
}

.direct-link-fixed {
    display: flex;
    margin-top: 15px;
}

#note-link-fixed {
    flex: 1;
    padding: 10px 15px;
    border: 1px solid #e0e0e0;
    border-radius: 8px 0 0 8px;
    font-size: 0.9rem;
    background: #fafafa;
}

#copy-link-fixed {
    padding: 0 15px;
    background: #ff7eb3;
    color: white;
    border: none;
    border-radius: 0 8px 8px 0;
    cursor: pointer;
    font-weight: 500;
    transition: background 0.2s;
}

#copy-link-fixed:hover {
    background: #ff6b9e;
}

/* ===== Responsive Design ===== */
@media (max-width: 768px) {
    .notepad-container-fixed {
        margin: 15px;
        border-radius: 8px;
    }
    
    .notepad-header-fixed {
        flex-direction: column;
        gap: 15px;
        padding: 15px;
    }
    
    .notepad-toolbar-fixed {
        padding: 10px;
        gap: 6px;
    }
    
    .notepad-content-fixed {
        min-height: 300px;
        padding: 20px;
    }
    
    .tool-btn-fixed {
        padding: 6px 10px;
        font-size: 0.85rem;
    }
    
    .share-options-fixed {
        grid-template-columns: 1fr;
    }
    
    .modal-content-fixed {
        margin: 5vh auto;
        padding: 20px;
    }
}

/* ===== Toolbar Scroll for Mobile ===== */
@media (max-width: 480px) {
    .notepad-toolbar-fixed {
        overflow-x: auto;
        padding-bottom: 8px;
    }
    
    .notepad-toolbar-fixed::-webkit-scrollbar {
        height: 5px;
    }
    
    .notepad-toolbar-fixed::-webkit-scrollbar-thumb {
        background: #e0e0e0;
        border-radius: 3px;
    }
}