/**
 * CSS for code_project shortcode
 * Styles code blocks to look like Android Studio
 */

.code-project-container {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    margin: 20px 0;
}

.code-project-title {
    background-color: #3c3f41;
    color: #ffffff;
    padding: 10px 15px;
    border-top-left-radius: 6px;
    border-top-right-radius: 6px;
    font-weight: bold;
    border-bottom: 1px solid #2b2b2b;
    display: flex;
    align-items: center;
}

.code-project-title .file-icon {
    margin-right: 8px;
    width: 16px;
    height: 16px;
    display: inline-block;
}

.code-project-tabs {
    background-color: #2b2d30;
    display: flex;
    border-bottom: 1px solid #1e1e1e;
    overflow-x: auto;
    white-space: nowrap;
}

.code-project-tabs .tab-button {
    padding: 8px 15px;
    color: #a7a7a7;
    border: none;
    background: transparent;
    cursor: pointer;
    font-size: 13px;
    position: relative;
}

.code-project-tabs .tab-button:hover {
    color: #ffffff;
}

.code-project-tabs .tab-button.active {
    color: #ffffff;
    background-color: #2d2f32;
}

.code-project-tabs .tab-button.active::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 2px;
    background-color: #4a88c7;
}

.code-project-content {
    background-color: #2b2d30;
    border-bottom-left-radius: 6px;
    border-bottom-right-radius: 6px;
    overflow: hidden;
}

.android-studio-code pre {
    margin: 0;
    padding: 0;
    background-color: transparent; /* Override theme defaults */
}

.android-studio-code pre code {
    display: block;
    padding: 16px;
    border-radius: 0;
    font-family: 'JetBrains Mono', Consolas, 'Courier New', monospace;
    font-size: 13px;
    line-height: 1.5;
    tab-size: 4;
    background-color: transparent; /* Override theme defaults */
    position: relative;
    counter-reset: line;
}

.android-studio-code pre code.has-line-numbers {
    padding-left: 3.5em;
}

.android-studio-code pre code .line-number {
    position: absolute;
    left: 0;
    color: #606366;
    text-align: right;
    width: 2.5em;
    padding-right: 0.5em;
    border-right: 1px solid #3c3f41;
    user-select: none;
}

/* Project structure styling */
.project-structure {
    background-color: #2b2d30;
    color: #a7a7a7;
    font-family: 'JetBrains Mono', Consolas, 'Courier New', monospace;
    padding: 15px;
    border-radius: 6px;
}

.project-structure pre {
    margin: 0;
    background-color: transparent;
    color: inherit;
}

.project-structure pre code {
    background-color: transparent;
    color: inherit;
    padding: 0;
}

.folder-name {
    color: #c19c5e;
    font-weight: bold;
}

.file-name {
    color: #a7a7a7;
}

.gradle-file {
    color: #7cb342;
}

.java-file {
    color: #f98b00;
}

.xml-file {
    color: #7c9cef;
}

.manifest-file {
    color: #f44336;
}

/* Tab content styling */
.code-tab {
    display: none;
}

.code-tab.active {
    display: block;
}

/* File icons */
.file-icon.java:before {
    content: "J";
    background-color: #f98b00;
    color: white;
    padding: 0 4px;
    border-radius: 3px;
    font-size: 11px;
}

.file-icon.xml:before {
    content: "X";
    background-color: #7c9cef;
    color: white;
    padding: 0 4px;
    border-radius: 3px;
    font-size: 11px;
}

.file-icon.gradle:before {
    content: "G";
    background-color: #7cb342;
    color: white;
    padding: 0 4px;
    border-radius: 3px;
    font-size: 11px;
}

/* Responsive design */
@media (max-width: 768px) {
    .code-project-tabs {
        flex-wrap: wrap;
    }
    
    .android-studio-code pre code.has-line-numbers {
        padding-left: 3em;
    }
    
    .android-studio-code pre code .line-number {
        width: 2em;
    }
}
