/* ===== MAIN APP STYLES ===== */
body {
    font-family: Arial, sans-serif;
    margin: 0;
    padding: 20px;
    background-color: #f5f5f5;
}

.top-bar {
    text-align: right;
    margin-bottom: 20px;
    padding: 10px;
    background-color: #333;
    color: white;
    border-radius: 5px;
}

.top-bar a {
    color: white;
    text-decoration: none;
    margin: 0 10px;
}

.top-bar a:hover {
    text-decoration: underline;
}

/* ===== EMMET WINDOW STYLES ===== */
.emmet-window-container {
    margin-bottom: 30px;
}

.emmet-window {
    width: 100%;
    padding: 15px;
    border: 2px solid #ddd;
    border-radius: 8px;
    font-family: 'Courier New', monospace;
    font-size: 16px;
    background-color: white;
    resize: vertical;
    min-height: 120px;
    box-sizing: border-box;
}

.emmet-window:focus {
    outline: none;
    border-color: #007cba;
}

/* ===== ACTION BUTTONS STYLES ===== */
.emmet-actions {
    margin-top: 15px;
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.action-btn {
    padding: 12px 20px;
    border-radius: 5px;
    cursor: pointer;
    font-size: 14px;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 5px;
    min-width: 80px;
}

.btn-clear {
    background-color: #dc3545;
    color: white;
    border: 1px solid #dc3545;
}

.btn-clear:hover {
    background-color: #c82333;
    border-color: #c82333;
}

.btn-undo {
    background-color: #6c757d;
    color: white;
    border: 1px solid #6c757d;
}

.btn-undo:hover {
    background-color: #5a6268;
    border-color: #5a6268;
}

.btn-redo {
    background-color: #6c757d;
    color: white;
    border: 1px solid #6c757d;
}

.btn-redo:hover {
    background-color: #5a6268;
    border-color: #5a6268;
}

.btn-copy {
    background-color: #28a745;
    color: white;
    border: 1px solid #28a745;
}

.btn-copy:hover {
    background-color: #218838;
    border-color: #218838;
}

.btn-copy.copied {
    background-color: #20c997;
    border-color: #20c997;
}

.btn-custom-text {
    background-color: #fd7e14;
    color: white;
    border: 1px solid #fd7e14;
    padding: 10px 20px;
    border-radius: 5px;
    cursor: pointer;
    font-size: 14px;
    text-decoration: none;
    display: inline-block;
    transition: all 0.3s ease;
}

.btn-custom-text:hover {
    background-color: #e8650e;
    border-color: #e8650e;
    color: white;
    text-decoration: none;
}

.btn-toggle-nesting {
    background-color: #6f42c1;
    color: white;
    border: 1px solid #6f42c1;
}

.btn-toggle-nesting:hover {
    background-color: #5a32a3;
    border-color: #5a32a3;
}

/* ===== CATEGORY STYLES ===== */
.category-section {
    margin-bottom: 30px;
}

.category-header {
    font-size: 18px;
    font-weight: bold;
    margin-bottom: 15px;
    padding: 10px;
    background-color: #333;
    color: white;
    border-radius: 5px;
}

.buttons-container {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.dropdown-row {
    margin-bottom: 15px;
}

.regular-row {
    /* Regular buttons row - no extra margin needed */
}

/* Button Separator / Sub-heading */
.button-separator {
    width: 100%;
    display: flex;
    align-items: center;
    margin: 15px 0 10px 0;
    padding: 0;
}

.button-separator:first-child {
    margin-top: 5px;
}

.button-separator span {
    font-weight: 600;
    font-size: 13px;
    color: #555;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    padding-right: 15px;
    white-space: nowrap;
}

.button-separator::after {
    content: '';
    flex: 1;
    height: 1px;
    background: linear-gradient(to right, #ccc, transparent);
}

/* ===== EMMET BUTTON STYLES ===== */
.emmet-btn {
    padding: 12px 20px;
    border-radius: 5px;
    cursor: pointer;
    font-size: 14px;
    transition: all 0.3s ease;
    min-width: 80px;
}

/* Dropdown buttons keep solid fill styling */
.dropdown-btn.Modules {
    background-color: #007cba;
    color: white;
    border: 1px solid #007cba;
}

.dropdown-btn.Modules:hover {
    background-color: #005a87;
    border-color: #005a87;
}

.dropdown-btn.Classes {
    background-color: #28a745;
    color: white;
    border: 1px solid #28a745;
}

.dropdown-btn.Classes:hover {
    background-color: #1e7e34;
    border-color: #1e7e34;
}

.dropdown-btn.Emmet-Code {
    background-color: #6f42c1;
    color: white;
    border: 1px solid #6f42c1;
}

.dropdown-btn.Emmet-Code:hover {
    background-color: #5a32a3;
    border-color: #5a32a3;
}

/* Regular buttons have border-only styling */
.emmet-btn.Modules:not(.dropdown-btn) {
    background-color: transparent;
    color: #007cba;
    border: 1px solid #007cba;
}

.emmet-btn.Modules:not(.dropdown-btn):hover {
    background-color: #007cba;
    color: white;
}

.emmet-btn.Classes:not(.dropdown-btn) {
    background-color: transparent;
    color: #28a745;
    border: 1px solid #28a745;
}

.emmet-btn.Classes:not(.dropdown-btn):hover {
    background-color: #28a745;
    color: white;
}

.emmet-btn.Emmet-Code:not(.dropdown-btn) {
    background-color: transparent;
    color: #6f42c1;
    border: 1px solid #6f42c1;
}

.emmet-btn.Emmet-Code:not(.dropdown-btn):hover {
    background-color: #6f42c1;
    color: white;
}

/* ===== DROPDOWN STYLES ===== */
.dropdown-container {
    position: relative;
    display: inline-block;
}

.dropdown-btn {
    display: flex;
    align-items: center;
    gap: 8px;
}

.dropdown-btn i {
    font-size: 12px;
    transition: transform 0.3s ease;
}

.dropdown-container.open .dropdown-btn i {
    transform: rotate(180deg);
}

.dropdown-menu {
    position: absolute;
    top: 100%;
    left: 0;
    background-color: white;
    border: none;
    border-radius: 5px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    z-index: 1000;
    width: auto;
    display: none;
    flex-direction: column;
}

.dropdown-container.open .dropdown-menu {
    display: flex;
}

.dropdown-item {
    padding: 8px 12px;
    border: none !important;
    background-color: transparent;
    text-align: left;
    cursor: pointer;
    font-size: 13px;
    transition: background-color 0.3s ease;
    border-radius: 0;
    min-width: auto;
    white-space: nowrap;
}

.dropdown-item:first-child {
    border-top-left-radius: 3px;
    border-top-right-radius: 3px;
}

.dropdown-item:last-child {
    border-bottom-left-radius: 3px;
    border-bottom-right-radius: 3px;
}

.dropdown-item:hover {
    background-color: #f8f9fa;
}

/* Override category colors for dropdown items */
.dropdown-item.Modules {
    color: #007cba;
    background-color: transparent;
    border: none !important;
}

.dropdown-item.Modules:hover {
    background-color: #e3f2fd;
    color: #005a87;
    border: none !important;
}

.dropdown-item.Classes {
    color: #28a745;
    background-color: transparent;
    border: none !important;
}

.dropdown-item.Classes:hover {
    background-color: #e8f5e8;
    color: #1e7e34;
    border: none !important;
}

.dropdown-item.Emmet-Code {
    color: #6f42c1;
    background-color: transparent;
    border: none !important;
}

.dropdown-item.Emmet-Code:hover {
    background-color: #f3e5f5;
    color: #5a32a3;
    border: none !important;
}

/* ===== ADMIN STYLES ===== */
.admin-form {
    background-color: white;
    padding: 20px;
    border-radius: 8px;
    margin-bottom: 30px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.form-group {
    margin-bottom: 15px;
}

.form-group label {
    display: block;
    margin-bottom: 5px;
    font-weight: bold;
}

.form-group input,
.form-group select {
    width: 100%;
    padding: 8px;
    border: 1px solid #ddd;
    border-radius: 4px;
    box-sizing: border-box;
}

.form-group small {
    color: #666;
    font-size: 12px;
    margin-top: 5px;
    display: block;
}

.form-actions {
    margin-top: 20px;
}

.btn-save {
    background-color: #28a745;
    color: white;
    padding: 10px 20px;
    border: 1px solid #28a745;
    border-radius: 5px;
    cursor: pointer;
    margin-right: 10px;
    font-size: 14px;
    transition: all 0.3s ease;
}

.btn-save:hover {
    background-color: #218838;
    border-color: #218838;
}

.btn-cancel {
    background-color: #6c757d;
    color: white;
    padding: 10px 20px;
    border: 1px solid #6c757d;
    text-decoration: none;
    border-radius: 5px;
    display: inline-block;
    font-size: 14px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.btn-cancel:hover {
    background-color: #5a6268;
    border-color: #5a6268;
    color: white;
    text-decoration: none;
}

table {
    width: 100%;
    border-collapse: collapse;
    background-color: white;
    margin-bottom: 20px;
}

table th,
table td {
    padding: 10px;
    text-align: left;
    border-bottom: 1px solid #ddd;
}

table th {
    background-color: #f8f9fa;
    font-weight: bold;
}

.btn-edit {
    background-color: #6c757d;
    color: white;
    padding: 8px 15px;
    border: 1px solid #6c757d;
    border-radius: 5px;
    cursor: pointer;
    margin-right: 5px;
    font-size: 14px;
    text-decoration: none;
    display: inline-block;
    transition: all 0.3s ease;
}

.btn-edit:hover {
    background-color: #5a6268;
    border-color: #5a6268;
    color: white;
    text-decoration: none;
}

.btn-delete {
    background-color: #dc3545;
    color: white;
    padding: 8px 15px;
    border: 1px solid #dc3545;
    border-radius: 5px;
    cursor: pointer;
    font-size: 14px;
    text-decoration: none;
    display: inline-block;
    transition: all 0.3s ease;
}

.btn-delete:hover {
    background-color: #c82333;
    border-color: #c82333;
    color: white;
    text-decoration: none;
}

/* Project Selector */
.project-selector {
    margin-bottom: 20px;
    width: 100%;
    max-width: 300px;
}

.project-selector select {
    width: 100%;
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: 5px;
    font-size: 14px;
    background-color: white;
    cursor: pointer;
    transition: border-color 0.3s ease;
}

.project-selector select:hover {
    border-color: #007cba;
}

.project-selector select:focus {
    outline: none;
    border-color: #007cba;
    box-shadow: 0 0 0 2px rgba(0, 124, 186, 0.2);
}

/* Project-specific emmet buttons */
.emmet-btn.Project {
    background-color: transparent;
    color: #0066cc;
    border: 1px solid #0066cc;
}

.emmet-btn.Project:hover {
    background-color: #0066cc;
    color: white;
}

/* Project category header - blue */
.category-section.project-section .category-header {
    background-color: #0066cc;
}

/* Project Management Styles */
.project-list {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 20px;
    margin-top: 20px;
}

.project-item {
    background-color: white;
    border: 1px solid #ddd;
    border-radius: 5px;
    padding: 20px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.project-item-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 10px;
}

.project-item-header h3 {
    margin: 0;
    color: #333;
}

.project-actions {
    display: flex;
    gap: 8px;
    align-items: center;
}

.project-actions .delete-form {
    margin: 0;
}

.project-actions .btn-edit,
.project-actions .btn-delete {
    padding: 5px 10px;
    font-size: 12px;
}

.project-item h3 {
    margin: 0 0 10px 0;
    color: #333;
}

.project-item p {
    margin: 0 0 15px 0;
    color: #666;
}

.emmet-list {
    margin-top: 20px;
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 15px;
}

.emmet-item {
    background-color: white;
    border: 1px solid #ddd;
    border-radius: 5px;
    padding: 15px;
}

.emmet-item-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 10px;
}

.emmet-item-header h4 {
    margin: 0;
    color: #333;
}

.emmet-item-header .delete-form {
    margin: 0;
}

.emmet-item-header .btn-delete {
    width: 24px;
    height: 24px;
    padding: 0;
    font-size: 18px;
    line-height: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
}

.emmet-item h4 {
    margin: 0 0 10px 0;
    color: #333;
}

.emmet-item pre {
    margin: 0;
    padding: 10px;
    background-color: #f8f9fa;
    border-radius: 3px;
    overflow-x: auto;
}

.form {
    max-width: 500px;
    margin: 20px 0;
}

.form-group {
    margin-bottom: 15px;
}

.form-group label {
    display: block;
    margin-bottom: 5px;
    color: #333;
}

.form-group input,
.form-group textarea {
    width: 100%;
    padding: 8px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 14px;
}

.form-group textarea {
    min-height: 100px;
    resize: vertical;
} 