/*
Theme Name: SAP GUI Signature (Entropii)
Theme URI: https://entropii.net/
Author: Ivan Bolkhovitinov
Author URI: https://entropii.net/
Description: SAP GUI Signature / Enjoy theme for WordPress with left navigation tree and T-Code command field search.
Version: 2.0.0
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Text Domain: colorskin
Tags: two-columns, left-sidebar, custom-menu
*/

/*--------------------------------------------------------------
# Reset & Base SAP GUI Typography
--------------------------------------------------------------*/
*,
*:before,
*:after {
    box-sizing: border-box;
}

html, body {
    margin: 0;
    padding: 0;
    height: 100%;
    font-family: Tahoma, "Segoe UI", Arial, sans-serif;
    font-size: 13px;
    line-height: 1.45;
    color: #000000;
    background-color: #dbe5f1;
    /* Classic SAP GUI diagonal pinstripe background */
    background-image: repeating-linear-gradient(
        -45deg,
        #e6eef7,
        #e6eef7 2px,
        #dce6f2 2px,
        #dce6f2 4px
    );
}

a {
    color: #00468c;
    text-decoration: none;
}

a:hover,
a:focus {
    color: #002d5a;
    text-decoration: underline;
}

img {
    max-width: 100%;
    height: auto;
}

.cf:before,
.cf:after {
    content: " ";
    display: table;
}
.cf:after {
    clear: both;
}

.screen-reader-text {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    border: 0;
}

/*--------------------------------------------------------------
# SAP GUI Window Shell (#page)
--------------------------------------------------------------*/
.sap-window {
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    border: 1px solid #8fa3b8;
    background: transparent;
}

/*--------------------------------------------------------------
# 1. Window Title Bar
--------------------------------------------------------------*/
.sap-gui-header {
    background: #eef2f6;
    border-bottom: 1px solid #a5b3c2;
    user-select: none;
    flex-shrink: 0;
}

.sap-window-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 26px;
    padding: 0 6px;
    background: linear-gradient(to bottom, #f7f9fc 0%, #dce5f0 100%);
    border-bottom: 1px solid #b8c6d6;
    font-size: 12px;
    color: #5b6978;
}

.sap-window-bar-left {
    display: flex;
    align-items: center;
    gap: 6px;
    overflow: hidden;
    white-space: nowrap;
    text-overflow: ellipsis;
}

.sap-win-icon {
    display: inline-block;
    width: 14px;
    height: 12px;
    border: 1.5px solid #6c7a89;
    border-top-width: 3px;
    background: #ffffff;
    position: relative;
    flex-shrink: 0;
}

.sap-win-icon:after {
    content: "";
    position: absolute;
    top: 2px;
    left: 2px;
    width: 6px;
    height: 4px;
    background: #6c7a89;
}

.sap-window-title-text {
    font-family: "Segoe UI", Tahoma, sans-serif;
    font-size: 12px;
    color: #5a6775;
}

.sap-window-controls {
    display: flex;
    align-items: center;
    gap: 2px;
}

.sap-win-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 22px;
    height: 18px;
    font-size: 11px;
    color: #5a6775;
    text-decoration: none;
    cursor: pointer;
    border: 1px solid transparent;
}

.sap-win-btn:hover {
    background: #e1eaf3;
    border-color: #a5b6c8;
    color: #000000;
    text-decoration: none;
}

.sap-win-close:hover {
    background: #e81123;
    border-color: #c50f1f;
    color: #ffffff;
}

/*--------------------------------------------------------------
# 2. Menu Bar
--------------------------------------------------------------*/
.sap-menubar {
    background: linear-gradient(to bottom, #e8eff7 0%, #dde6f1 100%);
    border-bottom: 1px solid #c2cedb;
    padding: 0 6px;
    min-height: 23px;
    display: flex;
    align-items: center;
}

.sap-menu-nav {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    width: 100%;
    font-size: 12px;
}

.sap-top-menu,
.sap-wp-menu,
.sap-wp-menu ul {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
}

.sap-top-menu li,
.sap-wp-menu li {
    position: relative;
    margin: 0;
}

.sap-top-menu li a,
.sap-wp-menu li a {
    display: block;
    padding: 2px 8px;
    color: #1c2630;
    font-size: 12px;
    text-decoration: none;
    border: 1px solid transparent;
}

.sap-top-menu li a:hover,
.sap-wp-menu li a:hover,
.sap-wp-menu li.current_page_item > a,
.sap-wp-menu li.current-menu-item > a {
    background: #fff3c4;
    border-color: #d6a83e;
    color: #000000;
    text-decoration: none;
}

/*--------------------------------------------------------------
# 3. Standard Toolbar (Command Field / T-Code Search)
--------------------------------------------------------------*/
.sap-std-toolbar {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 3px;
    min-height: 32px;
    padding: 3px 8px;
    background: linear-gradient(to bottom, #f4f6f9 0%, #e9edf2 100%);
    border-bottom: 1px solid #c6cfd9;
}

.sap-tcode-form {
    display: flex;
    align-items: center;
    gap: 3px;
    margin: 0;
}

.sap-cmd-box {
    position: relative;
    display: inline-flex;
    align-items: center;
}

.sap-cmd-box.is-hidden {
    display: none;
}

.sap-cmd-input {
    width: 175px;
    height: 22px;
    padding: 1px 20px 1px 6px;
    font-family: Consolas, "Courier New", Tahoma, monospace;
    font-size: 12px;
    color: #000000;
    background: #ffffff;
    border: 1px solid #96a3b3;
    border-top-color: #7b8898;
    outline: none;
    box-shadow: inset 0 1px 1px rgba(0,0,0,0.06);
}

.sap-cmd-input:focus {
    background: #fff9e6;
    border-color: #0066cc;
}

.sap-cmd-arrow {
    position: absolute;
    right: 5px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 11px;
    color: #666;
    pointer-events: none;
}

/* Toolbar Icon Buttons */
.sap-icon-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 24px;
    height: 24px;
    padding: 0;
    background: transparent;
    border: 1px solid transparent;
    border-radius: 2px;
    color: #4a5a6a;
    font-size: 14px;
    cursor: pointer;
    text-decoration: none;
}

.sap-icon-btn:hover {
    background: linear-gradient(to bottom, #fffdf5 0%, #ffebb3 100%);
    border-color: #d6a83e;
    color: #000000;
    text-decoration: none;
}

.sap-icon-btn.is-disabled {
    opacity: 0.38;
    cursor: default;
    pointer-events: none;
}

/* SAP Signature Round Badges (Enter, Back, Exit, Cancel) */
.sap-circle-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    color: #ffffff;
    font-size: 10px;
    box-shadow: inset 0 1px 1px rgba(255,255,255,0.4), 0 1px 1px rgba(0,0,0,0.2);
}

.sap-circle-enter {
    background: radial-gradient(circle at 30% 30%, #2eb85c, #0f7d34);
    border: 1px solid #0b6328;
}

.sap-circle-back {
    background: radial-gradient(circle at 30% 30%, #34a853, #137a32);
    border: 1px solid #0e5e26;
}

.sap-circle-exit {
    background: radial-gradient(circle at 30% 30%, #f5b427, #d68300);
    border: 1px solid #b36b00;
}

.sap-circle-cancel {
    background: radial-gradient(circle at 30% 30%, #e53935, #b71c1c);
    border: 1px solid #8e1414;
}

.sap-toolbar-sep {
    width: 1px;
    height: 18px;
    background: #c5ced9;
    margin: 0 3px;
}

/*--------------------------------------------------------------
# 4. Screen Title Bar
--------------------------------------------------------------*/
.sap-titlebar {
    background: #f3f5f8;
    border-bottom: 1px solid #d0d7e1;
    padding: 4px 12px;
}

.sap-screen-title {
    margin: 0;
    font-family: "Segoe UI", Tahoma, sans-serif;
    font-size: 15px;
    font-weight: normal;
    color: #3b4a59;
}

.sap-screen-title a {
    color: #3b4a59;
    text-decoration: none;
}

.sap-screen-title a:hover {
    color: #00468c;
}

/*--------------------------------------------------------------
# 5. Application Toolbar
--------------------------------------------------------------*/
.sap-app-toolbar {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 4px;
    min-height: 28px;
    padding: 2px 8px;
    background: #eef1f5;
    border-bottom: 1px solid #b4c0ce;
}

.sap-app-btn {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    height: 22px;
    padding: 0 8px;
    font-family: Tahoma, "Segoe UI", sans-serif;
    font-size: 12px;
    color: #22303e;
    background: transparent;
    border: 1px solid transparent;
    border-radius: 2px;
    cursor: pointer;
    text-decoration: none;
}

.sap-app-btn i {
    color: #1f5c99;
    font-size: 13px;
}

.sap-app-btn:hover {
    background: linear-gradient(to bottom, #fffdf5 0%, #ffebb3 100%);
    border-color: #d6a83e;
    color: #000000;
    text-decoration: none;
}

/*--------------------------------------------------------------
# Workbench Split Area (#content)
--------------------------------------------------------------*/
.sap-workbench {
    flex: 1 0 auto;
    padding: 6px;
}

.sap-workspace-container {
    padding-left: 0;
    padding-right: 0;
}

.sap-splitter-row {
    margin-left: 0;
    margin-right: 0;
    display: flex;
    flex-wrap: wrap;
    align-items: stretch;
}

/* Pane Header (like SAP Tree/ALV column header) */
.sap-pane-header {
    background: linear-gradient(to bottom, #e7ecf2 0%, #d4dde8 100%);
    border-bottom: 1px solid #9daab9;
    padding: 3px 8px;
    font-size: 11px;
    font-weight: normal;
    color: #1f2b38;
}

/*--------------------------------------------------------------
# Left Pane: SAP Easy Access Tree (#secondary)
--------------------------------------------------------------*/
.sap-tree-pane {
    padding: 0;
    background: #ffffff;
    border: 1px solid #96a5b8;
    box-shadow: inset 0 0 0 1px #ffffff;
    display: flex;
    flex-direction: column;
}

body.sap-sidebar-collapsed .sap-tree-pane {
    display: none;
}

body.sap-sidebar-collapsed .sap-main-pane {
    width: 100% !important;
}

.sap-tree-container {
    padding: 6px 4px;
    overflow-x: auto;
    font-size: 12px;
    line-height: 1.35;
}

.sap-tree-root,
.sap-tree-children {
    list-style: none;
    margin: 0;
    padding: 0;
}

.sap-tree-children {
    padding-left: 16px;
    display: none;
}

.sap-tree-node.is-expanded > .sap-tree-children {
    display: block;
}

.sap-tree-row {
    display: flex;
    align-items: center;
    gap: 4px;
    padding: 1px 4px;
    white-space: nowrap;
    cursor: pointer;
    border: 1px solid transparent;
}

.sap-tree-row:hover {
    background: #eef5fc;
    border-color: #cce0f5;
}

.sap-tree-row.is-selected {
    background: #cce4f7;
    border-color: #8bbCE6;
}

.sap-tree-twisty,
.sap-tree-twisty-empty {
    display: inline-block;
    width: 12px;
    text-align: center;
    font-size: 10px;
    color: #556677;
    flex-shrink: 0;
}

/* SAP Tree Icons (Folder, Star, T-Code, Document) */
.sap-tree-icon {
    display: inline-block;
    width: 14px;
    height: 13px;
    flex-shrink: 0;
    position: relative;
}

/* Yellow SAP Folder Icon */
.sap-icon-folder {
    background: linear-gradient(to bottom, #ffe066 0%, #f5b800 100%);
    border: 1px solid #c99300;
    border-radius: 1px;
    height: 11px;
    margin-top: 1px;
}
.sap-icon-folder:before {
    content: "";
    position: absolute;
    top: -3px;
    left: 0;
    width: 6px;
    height: 2px;
    background: #ffe066;
    border: 1px solid #c99300;
    border-bottom: none;
}

/* Gold Star Favorite Icon */
.sap-icon-fav:before {
    content: "\f005";
    font-family: FontAwesome;
    color: #e6a800;
    font-size: 13px;
    line-height: 1;
}

/* SAP Transaction / Executable Icon */
.sap-icon-tcode:before {
    content: "\f013";
    font-family: FontAwesome;
    color: #4f6b88;
    font-size: 12px;
    line-height: 1;
}

/* SAP Document Icon */
.sap-icon-doc:before {
    content: "\f0f6";
    font-family: FontAwesome;
    color: #3f6896;
    font-size: 12px;
    line-height: 1;
}

.sap-tree-label,
.sap-tree-link {
    color: #000000;
    text-decoration: none;
    font-size: 12px;
}

.sap-tree-link:hover {
    color: #00468c;
    text-decoration: underline;
}

.sap-tree-count {
    color: #6b7a89;
    font-size: 11px;
}

/*--------------------------------------------------------------
# Right Pane: Main Content Area (#primary)
--------------------------------------------------------------*/
.sap-main-pane {
    padding: 0 0 0 6px;
}

@media (max-width: 991px) {
    .sap-main-pane {
        padding: 6px 0 0 0;
    }
}

.sap-main-pane > .sap-pane-header {
    border: 1px solid #96a5b8;
    border-bottom: none;
}

.site-main {
    background: rgba(255, 255, 255, 0.55);
    border: 1px solid #96a5b8;
    padding: 10px;
}

/*--------------------------------------------------------------
# SAP Groupbox (Articles / Posts)
--------------------------------------------------------------*/
.sap-groupbox {
    background: #ffffff;
    border: 1px solid #b8c4d1;
    margin-bottom: 12px;
    padding: 10px 14px;
    box-shadow: 0 1px 1px rgba(0,0,0,0.03);
}

.sap-groupbox-header {
    border-bottom: 2px solid #0083c9;
    padding-bottom: 5px;
    margin-bottom: 10px;
}

.sap-groupbox-title-row {
    display: flex;
    align-items: baseline;
    gap: 8px;
    flex-wrap: wrap;
}

.sap-doc-badge {
    font-family: Consolas, "Courier New", monospace;
    font-size: 11px;
    color: #1c4e80;
    background: #e1ecf7;
    border: 1px solid #9cb8d6;
    padding: 0 5px;
}

.entry-title {
    margin: 0;
    font-family: Tahoma, "Segoe UI", sans-serif;
    font-size: 15px;
    font-weight: bold;
    color: #1a2733;
}

.entry-title a {
    color: #1a2733;
    text-decoration: none;
}

.entry-title a:hover {
    color: #00569e;
    text-decoration: underline;
}

.sap-meta-bar {
    margin-top: 4px;
    font-size: 11px;
    color: #556575;
}

.sap-meta-bar span {
    margin-right: 12px;
}

.sap-meta-bar a {
    color: #345578;
}

/* Post Content */
.sap-groupbox-body {
    font-size: 13px;
    line-height: 1.55;
    color: #111111;
}

.sap-groupbox-body p {
    margin: 0 0 10px;
}

.sap-groupbox-body ul,
.sap-groupbox-body ol {
    margin: 0 0 12px 22px;
    padding: 0;
}

.sap-groupbox-body ul {
    list-style: disc;
}

.sap-groupbox-body ol {
    list-style: decimal;
}

/* ABAP Editor Code Blocks */
pre,
code,
kbd,
tt,
var {
    font-family: Consolas, "Courier New", monospace;
    font-size: 12px;
}

pre {
    background: #eff3f8;
    border: 1px solid #9aa9ba;
    border-left: 24px solid #dce4ee;
    padding: 10px 12px;
    overflow-x: auto;
    margin: 0 0 12px;
    color: #000000;
}

blockquote {
    background: #fffef0;
    border: 1px solid #d8cfa8;
    border-left: 4px solid #d6a83e;
    margin: 0 0 12px;
    padding: 8px 12px;
    color: #2b2b2b;
}

/* Tables styled like SAP ALV Grid */
.sap-groupbox-body table {
    width: 100%;
    border-collapse: collapse;
    margin: 0 0 12px;
    font-size: 12px;
}

.sap-groupbox-body th {
    background: linear-gradient(to bottom, #d9ecf7 0%, #bce0f5 100%);
    border: 1px solid #8ba8c4;
    padding: 4px 8px;
    font-weight: normal;
    color: #000000;
    text-align: left;
}

.sap-groupbox-body td {
    border: 1px solid #c5d1de;
    padding: 4px 8px;
    background: #ffffff;
}

.sap-groupbox-body tr:nth-child(even) td {
    background: #f4f8fc;
}

/* Entry Footer (Categories & Tags) */
.entry-footer {
    margin-top: 10px;
    padding-top: 6px;
    border-top: 1px solid #dce3ec;
    font-size: 11px;
    color: #556575;
}

.entry-footer span {
    margin-right: 12px;
}

.entry-footer a {
    display: inline-block;
    padding: 0 5px;
    background: #eef3f8;
    border: 1px solid #b5c4d4;
    color: #1e3f61;
    text-decoration: none;
}

.entry-footer a:hover {
    background: #fff3c4;
    border-color: #d6a83e;
    color: #000000;
}

/*--------------------------------------------------------------
# SAP Buttons & Navigation
--------------------------------------------------------------*/
.sap-btn,
button,
input[type="button"],
input[type="reset"],
input[type="submit"],
.previous a,
.next a,
.reply a {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 5px;
    min-height: 23px;
    padding: 2px 12px;
    font-family: Tahoma, "Segoe UI", sans-serif;
    font-size: 12px;
    color: #000000;
    background: linear-gradient(to bottom, #f7f9fb 0%, #dfe5ec 100%);
    border: 1px solid #8a99a8;
    cursor: pointer;
    text-decoration: none;
}

.sap-btn:hover,
button:hover,
input[type="button"]:hover,
input[type="reset"]:hover,
input[type="submit"]:hover,
.previous a:hover,
.next a:hover,
.reply a:hover {
    background: linear-gradient(to bottom, #fffdf5 0%, #ffebb3 100%);
    border-color: #d6a83e;
    color: #000000;
    text-decoration: none;
}

.posts-navigation,
.post-navigation {
    margin: 12px 0 4px;
}

.default-wp-page {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    justify-content: space-between;
    gap: 10px;
}

/*--------------------------------------------------------------
# SAP Dialog Box (404 / Empty Search Results)
--------------------------------------------------------------*/
.sap-dialog-box {
    max-width: 440px;
    margin: 25px auto;
    background: #ffffff;
    border: 1px solid #8a99a8;
    box-shadow: 0 3px 10px rgba(0, 0, 0, 0.18);
}

.sap-dialog-titlebar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 25px;
    padding: 0 8px;
    background: linear-gradient(to bottom, #f4f7fa 0%, #dde5ef 100%);
    border-bottom: 1px solid #b5c2d1;
    font-size: 12px;
    color: #556575;
}

.sap-dialog-close {
    color: #667788;
    text-decoration: none;
    font-size: 12px;
}

.sap-dialog-body {
    padding: 16px 18px;
    font-size: 13px;
}

.sap-dialog-row {
    display: flex;
    align-items: center;
    gap: 14px;
    margin: 14px 0;
}

.sap-dialog-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
    border-radius: 50%;
    font-weight: bold;
    font-size: 16px;
    color: #ffffff;
    flex-shrink: 0;
}

.sap-dialog-qmark {
    background: #008a3b;
}

.sap-dialog-actions {
    display: flex;
    justify-content: flex-end;
    gap: 4px;
    margin-top: 16px;
}

/*--------------------------------------------------------------
# Comments (SAP Performance Assistant / Long Text style)
--------------------------------------------------------------*/
.comments-area {
    margin-top: 14px;
    background: #ffffec;
    border: 1px solid #96a5b8;
    padding: 12px 14px;
}

.comments-title,
#reply-title {
    margin: 0 0 10px;
    font-size: 13px;
    font-weight: bold;
    color: #000080;
    border-bottom: 1px solid #ccd6e0;
    padding-bottom: 4px;
}

.comment-list {
    list-style: none;
    margin: 0 0 12px;
    padding: 0;
}

.comment-body {
    background: #ffffff;
    border: 1px solid #c5d0dc;
    padding: 8px 10px;
    margin-bottom: 8px;
}

.comment-metadata {
    font-size: 11px;
    color: #667788;
    margin-bottom: 4px;
}

.avatar {
    float: left;
    margin-right: 8px;
    border: 1px solid #96a5b8;
}

#commentform label {
    display: block;
    font-size: 12px;
    margin: 6px 0 2px;
}

#commentform input[type="text"],
#commentform input[type="email"],
#commentform input[type="url"],
#commentform textarea {
    width: 100%;
    padding: 3px 6px;
    font-family: Tahoma, sans-serif;
    font-size: 12px;
    background: #ffffff;
    border: 1px solid #8a99a8;
}

#commentform input:focus,
#commentform textarea:focus {
    background: #fff9e6;
    border-color: #0066cc;
    outline: none;
}

/*--------------------------------------------------------------
# 6. SAP Status Bar (Footer #colophon)
--------------------------------------------------------------*/
.sap-statusbar {
    flex-shrink: 0;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    min-height: 24px;
    padding: 2px 8px;
    background: linear-gradient(to bottom, #eef2f7 0%, #dce4ee 100%);
    border-top: 1px solid #a5b4c4;
    font-size: 11px;
    color: #1f2b38;
}

.sap-status-msg {
    display: flex;
    align-items: center;
    gap: 6px;
    flex: 1 1 auto;
}

.sap-status-ok {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 14px;
    height: 14px;
    border-radius: 50%;
    background: #10893e;
    color: #ffffff;
    font-size: 9px;
}

.sap-status-logo {
    padding: 0 12px;
}

.sap-logo-badge {
    display: inline-block;
    padding: 0 6px;
    font-family: Arial, sans-serif;
    font-weight: 900;
    font-size: 10px;
    letter-spacing: 0.5px;
    color: #ffffff;
    background: linear-gradient(135deg, #008fd3 0%, #005092 100%);
    border-radius: 1px;
}

.sap-status-sysinfo {
    display: flex;
    align-items: center;
}

.sap-sys-cell {
    padding: 0 8px;
    border-left: 1px solid #b8c4d1;
    color: #2c3a47;
}

.sap-sys-cell a {
    color: #2c3a47;
}
