/* Online Notepad Styles */
.online-notepad-container {
    border: 1px solid #bbbbbb;
    border-radius: 12px;
    background: #fff;
    font-family: "Manrope", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen-Sans, Ubuntu, Cantarell, "Helvetica Neue", sans-serif;
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
    display: flex;
    flex-direction: column;
    margin: 15px 0;
    max-width: 100%;
    overflow: hidden;
}

/* Toolbar Styles */
.notepad-toolbar {
    background: #eeeeee;
    border-bottom: 1px solid #bbbbbb;
    padding: 12px 16px;
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    align-items: center;
}

.toolbar-group {
    display: flex;
    align-items: center;
    gap: 6px;
    padding-right: 16px;
    border-right: 1px solid #cccccc;
}

.toolbar-group:last-child {
    border-right: none;
}

.toolbar-btn {
    background: #1976ea;
    border: 1px solid #1976ea;
    border-radius: 6px;
    padding: 8px 12px;
    cursor: pointer;
    font-size: 14px;
    font-family: "Manrope", sans-serif;
    color: #ffffff;
    transition: all 0.2s ease;
    min-width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 500;
}

.toolbar-btn:hover {
    background: #219b92;
    border-color: #219b92;
    transform: translateY(-1px);
}

.toolbar-btn:active {
    background: #1a887f;
    transform: translateY(0);
}

.toolbar-btn.active {
    background: #219b92;
    color: #ffffff;
    border-color: #219b92;
    box-shadow: 0 2px 8px rgba(33, 155, 146, 0.3);
}

#notepad-font,
#notepad-font-size {
    border: 1px solid #bbbbbb;
    border-radius: 6px;
    padding: 6px 10px;
    font-size: 13px;
    font-family: "Manrope", sans-serif;
    background: #ffffff;
    height: 36px;
    color: #000000;
}

#notepad-highlight-color {
    width: 36px;
    height: 32px;
    border: 1px solid #bbbbbb;
    border-radius: 6px;
    cursor: pointer;
    background: #ffffff;
}

/* Text Area */
.notepad-textarea-container {
    flex: 1;
    position: relative;
    padding: 20px;
    min-height: 350px;
    background: #ffffff;
}

.notepad-content {
    width: 100%;
    height: 100%;
    border: 1px solid #bbbbbb;
    border-radius: 8px;
    resize: none;
    font-family: "Manrope", sans-serif;
    font-size: 15px;
    line-height: 1.6;
    outline: none;
    min-height: 350px;
    overflow-y: auto;
    padding: 16px;
    background: #ffffff;
    color: #000000;
}

.notepad-content:focus {
    background: #ffffff;
    border-color: #1976ea;
    box-shadow: 0 0 0 2px rgba(25, 118, 234, 0.1);
}

/* Text Formatting */
.notepad-content strong {
    font-weight: bold;
    color: #000000;
}

.notepad-content em {
    font-style: italic;
    color: #000000;
}

.notepad-content u {
    text-decoration: underline;
    color: #000000;
}

.notepad-content .align-left {
    text-align: left;
}

.notepad-content .align-center {
    text-align: center;
}

.notepad-content .align-right {
    text-align: right;
}

.notepad-content .align-justify {
    text-align: justify;
}

/* Modal Styles */
.notepad-modal {
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0,0,0,0.4);
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: "Manrope", sans-serif;
}

.modal-content {
    background: #fff;
    border-radius: 12px;
    border: 1px solid #bbbbbb;
    padding: 24px;
    width: 90%;
    max-width: 420px;
    box-shadow: 0 8px 25px rgba(0,0,0,0.15);
}

.modal-content h3 {
    margin: 0 0 20px 0;
    color: #1976ea;
    font-family: "Manrope", sans-serif;
    font-weight: 600;
    font-size: 20px;
}

.modal-body {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-bottom: 20px;
}

.modal-body input {
    padding: 10px 14px;
    border: 1px solid #bbbbbb;
    border-radius: 6px;
    font-size: 14px;
    font-family: "Manrope", sans-serif;
    background: #ffffff;
    color: #000000;
}

.modal-body input:focus {
    border-color: #1976ea;
    outline: none;
    box-shadow: 0 0 0 2px rgba(25, 118, 234, 0.1);
}

.modal-actions {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.modal-actions button {
    padding: 10px 20px;
    border: 1px solid #1976ea;
    border-radius: 6px;
    background: #1976ea;
    color: #fff;
    cursor: pointer;
    font-size: 14px;
    font-family: "Manrope", sans-serif;
    font-weight: 500;
    flex: 1;
    min-width: 90px;
    transition: all 0.2s ease;
}

.modal-actions button:hover {
    background: #219b92;
    border-color: #219b92;
    transform: translateY(-1px);
}

#close-find-modal {
    background: #6c757d;
    border-color: #6c757d;
}

#close-find-modal:hover {
    background: #5a6268;
    border-color: #5a6268;
}

/* Status Bar */
.notepad-status-bar {
    background: #eeeeee;
    border-top: 1px solid #bbbbbb;
    padding: 8px 16px;
    display: flex;
    justify-content: space-between;
    font-size: 13px;
    color: #000000;
    font-family: "Manrope", sans-serif;
}

/* Fullscreen Mode */
.online-notepad-container.fullscreen {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw !important;
    height: 100vh !important;
    z-index: 9999;
    margin: 0;
    border-radius: 0;
    border: none;
}

.online-notepad-container.fullscreen .notepad-textarea-container {
    min-height: calc(100vh - 120px);
    height: calc(100vh - 120px);
}

.online-notepad-container.fullscreen .notepad-content {
    min-height: calc(100vh - 170px);
    height: calc(100vh - 170px);
    border-radius: 0;
    border: none;
}

/* Highlighted Text */
.highlighted {
    background-color: yellow;
    padding: 2px 4px;
    border-radius: 4px;
    color: #000000;
}

.highlighted.yellow { background-color: #ffff00; }
.highlighted.red { background-color: #ffcccc; }
.highlighted.green { background-color: #ccffcc; }
.highlighted.blue { background-color: #cce5ff; }
.highlighted.pink { background-color: #ffccf9; }

/* Font Families */
.font-arial { font-family: Arial, sans-serif; }
.font-helvetica { font-family: Helvetica, sans-serif; }
.font-times { font-family: "Times New Roman", serif; }
.font-courier { font-family: "Courier New", monospace; }
.font-georgia { font-family: Georgia, serif; }
.font-verdana { font-family: Verdana, sans-serif; }
.font-tahoma { font-family: Tahoma, sans-serif; }
.font-trebuchet { font-family: "Trebuchet MS", sans-serif; }
.font-palatino { font-family: Palatino, serif; }
.font-garamond { font-family: Garamond, serif; }
.font-comic { font-family: "Comic Sans MS", cursive; }
.font-impact { font-family: Impact, sans-serif; }
.font-monospace { font-family: monospace; }

/* Responsive Design */
@media (max-width: 768px) {
    .online-notepad-container {
        width: 100%;
        min-height: 450px;
        border-radius: 10px;
    }
    
    .notepad-toolbar {
        padding: 10px 12px;
        gap: 6px;
    }
    
    .toolbar-group {
        padding-right: 12px;
    }
    
    .toolbar-btn {
        padding: 6px 8px;
        min-width: 32px;
        font-size: 13px;
        height: 32px;
    }
    
    .notepad-textarea-container {
        padding: 15px;
    }
    
    .modal-content {
        margin: 20px;
        width: calc(100% - 40px);
    }

    #notepad-font,
    #notepad-font-size {
        height: 32px;
        font-size: 12px;
        padding: 4px 6px;
    }
}

@media (max-width: 480px) {
    .toolbar-group {
        border-right: none;
        padding-right: 0;
    }
    
    .modal-actions {
        flex-direction: column;
    }
    
    .modal-actions button {
        flex: none;
    }
    
    .online-notepad-container {
        border-radius: 8px;
    }
}

/* Print Styles */
@media print {
    .online-notepad-container {
        border: none;
        box-shadow: none;
        width: 100%;
        height: auto;
        border-radius: 0;
    }
    
    .notepad-toolbar,
    .notepad-status-bar {
        display: none;
    }
    
    .notepad-textarea-container {
        padding: 0;
    }
    
    .notepad-content {
        min-height: auto;
        height: auto;
        border: none;
        background: #ffffff;
        color: #000000;
    }
}

/* Card Design Enhancements */
.online-notepad-container {
    transition: all 0.3s ease;
}

.online-notepad-container:hover {
    box-shadow: 0 6px 20px rgba(0,0,0,0.12);
}

/* Additional Text Color Consistency */
.notepad-toolbar,
.notepad-status-bar,
.modal-content,
.modal-body input::placeholder {
    color: #000000;
}

/* Focus States for Accessibility */
.toolbar-btn:focus,
#notepad-font:focus,
#notepad-font-size:focus,
#notepad-highlight-color:focus {
    outline: none;
    box-shadow: 0 0 0 2px rgba(25, 118, 234, 0.3);
}