/* public/css/style.css */
/* IBM OS/2 Warp 3 Theme - Complete */

/* === 1. Global Styles === */
body {
    font-family: 'Helvetica', Arial, sans-serif;
    font-size: 16px;
    background-color: #008080;
    color: #000000;
    margin: 0;
    padding: 0;
    padding-bottom: 40px;
}

a {
    color: #000080;
    text-decoration: none;
}
a:hover {
    text-decoration: underline;
}
hr {
    border: 0;
    border-top: 2px groove #c0c0c0;
}

/* === 2. OS/2 Layout (Window, Nav, Footer) === */
.window {
    background-color: #c0c0c0;
    border-top: 2px solid #ffffff;
    border-left: 2px solid #ffffff;
    border-right: 2px solid #404040;
    border-bottom: 2px solid #404040;
    box-shadow: 2px 2px 5px rgba(0,0,0,0.5);
    min-width: 300px;
    max-width: 900px;
    margin: 20px auto;
}

.window-title-bar {
    background: linear-gradient(to right, #400040, #600060);
    color: #ffffff;
    padding: 4px 8px;
    font-weight: bold;
    display: flex;
    justify-content: space-between;
    align-items: center;
}
.window-title-bar .title {
    padding-left: 5px;
}

.window-content {
    padding: 15px;
    background-color: #c0c0c0;
    border: 1px solid #404040;
    margin: 3px;
}

.window-footer {
    position: fixed;
    bottom: 0;
    left: 0;
    width: 100%;
    background: #500050;
    border-top: 2px solid #ffffff;
    padding: 8px;
    text-align: left;
    font-size: 14px;
    color: #ffffff;
    z-index: 100;
}
.window-footer span {
    color: #ffffff;
}

/* === Movable Launchpad === */
#launchpad {
    position: fixed;
    top: 20px;
    left: 20px;
    background-color: #c0c0c0;
    border-top: 2px solid #ffffff;
    border-left: 2px solid #ffffff;
    border-right: 2px solid #404040;
    border-bottom: 2px solid #404040;
    z-index: 101;
    display: flex;
    flex-direction: column;
    width: auto;
    min-width: 150px;
}
#launchpad-header {
    width: 100%;
    height: auto;
    padding: 4px 8px;
    background: linear-gradient(to right, #400040, #600060);
    cursor: move;
    color: #ffffff;
    box-sizing: border-box;
    text-align: left;
}
#launchpad-header h3 {
    margin: 0;
    font-size: 16px;
    padding-left: 0;
    font-weight: bold;
    white-space: nowrap;
}

.launchpad-content {
    display: flex;
    flex-direction: row;
    padding: 4px;
    justify-content: flex-start;
    align-items: center; /* Vertically align items */
}
.launchpad-button {
    background-color: #c0c0c0;
    border-top: 2px solid #ffffff;
    border-left: 2px solid #ffffff;
    border-right: 2px solid #404040;
    border-bottom: 2px solid #404040;
    margin: 4px;
    padding: 5px;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
}
.launchpad-button:active {
    border-top: 2px solid #404040;
    border-left: 2px solid #404040;
    border-right: 2px solid #ffffff;
    border-bottom: 2px solid #ffffff;
}
.launchpad-button img {
    width: 28px;
    height: 28px;
}
/* Horizontal divider (between header and content) */
.launchpad-divider {
    width: 95%;
    height: 2px;
    background: #808080;
    border-top: 1px solid #404040;
    border-bottom: 1px solid #ffffff;
    margin: 2px auto;
}
/* Vertical divider (within content) */
.vertical-divider {
    width: 2px;
    height: 32px; /* Match button height */
    background: #808080;
    border-left: 1px solid #404040;
    border-right: 1px solid #ffffff;
    border-top: none;
    border-bottom: none;
    margin: 4px 8px; /* Adjust margin for spacing */
}


/* === 3. Form Elements === */
button, input[type="submit"], .edit-button {
    font-family: 'Helvetica', Arial, sans-serif;
    background-color: #c0c0c0;
    border-top: 2px solid #ffffff;
    border-left: 2px solid #ffffff;
    border-right: 2px solid #404040;
    border-bottom: 2px solid #404040;
    padding: 8px 12px;
    min-width: 80px;
    cursor: pointer;
    text-decoration: none;
    color: #000;
}
button:active, input[type="submit"]:active, .edit-button:active {
    border-top: 2px solid #404040;
    border-left: 2px solid #404040;
    border-right: 2px solid #ffffff;
    border-bottom: 2px solid #ffffff;
}

input[type="text"], input[type="password"], textarea, select {
    font-family: 'Helvetica', Arial, sans-serif;
    font-size: 14px;
    border: 2px solid;
    border-color: #404040 #ffffff #ffffff #404040;
    padding: 5px;
    background-color: #ffffff;
}
textarea {
    width: 95%;
    min-height: 300px;
}

/* === 4. Content Styling (Lists & Pages) === */

.page-list {
    list-style-type: none;
    padding-left: 0;
}
.page-list li {
    padding: 8px;
    border-bottom: 1px dotted #404040;
}
.page-list li a {
    font-size: 1.2em;
    font-weight: bold;
}
.page-list .meta {
    font-size: 0.8em;
    color: #404040;
    display: block;
    margin-top: 4px;
}

.page-body {
    background: #ffffff;
    border: 2px solid;
    border-color: #404040 #ffffff #ffffff #404040;
    padding: 15px;
    min-height: 200px;
}
.page-body h1, .page-body h2, .page-body h3 {
    border-bottom: 1px solid #c0c0c0;
}
.page-body img {
    max-width: 100%;
    height: auto;
    border: 1px solid #404040;
}
.page-body code {
    background: #eee;
    border: 1px solid #ccc;
    padding: 2px 4px;
}
.page-body blockquote {
    border-left: 4px solid #c0c0c0;
    padding-left: 10px;
    margin-left: 10px;
    font-style: italic;
    color: #404040;
}

.page-meta {
    font-size: 0.9em;
    color: #333;
}
.page-meta code {
     background: #eee;
     border: 1px solid #ccc;
     padding: 1px 3px;
     font-size: 0.9em;
}
.page-meta ul {
    font-size: 0.9em;
    max-height: 150px;
    overflow-y: auto;
    background: #ffffff;
    border: 1px solid #404040;
    padding: 10px;
}

/* Page Actions Bar & Buttons */
.page-actions-bar {
    overflow: auto; /* Clear floats */
    margin-bottom: 15px;
}
.edit-button {
    float: right;
    margin-bottom: 0;
    margin-left: 10px;
}
.print-button {
    float: right;
}


/* === 5. Admin & Notices === */

.notice-box {
    background: #fff8c4;
    border: 2px solid #a4913a;
    padding: 10px;
    margin-bottom: 15px;
    border-top: 2px solid #a4913a;
    border-left: 2px solid #a4913a;
    border-right: 2px solid #ffffff;
    border-bottom: 2px solid #ffffff;
}

.inline-form {
    display: inline;
    margin: 0;
    padding: 0;
}

.delete-button, .delete-button-small {
    background-color: #c0c0c0;
    color: #900;
    border-color: #ffffff #404040 #404040 #ffffff;
    font-weight: bold;
}
.delete-button:active, .delete-button-small:active {
    border-color: #404040 #ffffff #ffffff #404040;
}
.delete-button {
    padding: 8px 12px;
}

/* Small Buttons (Edit, Rename, Move, Delete) */
.edit-button-small,
.delete-button-small {
    font-family: 'Helvetica', Arial, sans-serif;
    background-color: #c0c0c0;
    border-top: 2px solid #ffffff;
    border-left: 2px solid #ffffff;
    border-right: 2px solid #404040;
    border-bottom: 2px solid #404040;
    padding: 1px 3px; /* Reduced padding */
    font-size: 11px;
    min-width: 0; /* No min width */
    text-decoration: none;
    color: #000;
    margin: 0; /* No margin */
    vertical-align: middle;
    line-height: 1; /* Tight line height */
    display: inline-block;
}
.delete-button-small {
    color: #900; /* Keep red for delete */
}

.edit-button-small:active,
.delete-button-small:active {
    border-top: 2px solid #404040;
    border-left: 2px solid #404040;
    border-right: 2px solid #ffffff;
    border-bottom: 2px solid #ffffff;
}

.page-list-admin {
    list-style-type: none;
    padding-left: 0;
}
.page-list-admin li {
    background: #c0c0c0;
    border-bottom: 2px solid #404040;
    border-top: 2px solid #ffffff;
    padding: 10px;
    margin-bottom: 5px;
    overflow: auto;
}
.page-list-admin .meta {
    font-size: 0.8em;
    color: #404040;
    display: block;
}

/* === 6. Profile Page Styles === */
.profile-header {
    overflow: auto;
    margin-bottom: 15px;
}
.profile-photo {
    float: left;
    width: 100px;
    height: 100px;
    object-fit: cover;
    margin-right: 15px;
    border-top: 2px solid #ffffff;
    border-left: 2px solid #ffffff;
    border-right: 2px solid #404040;
    border-bottom: 2px solid #404040;
    background-color: #c0c0c0;
}
.profile-username {
    margin: 0;
    padding-top: 5px;
}
.profile-tagline {
    font-style: italic;
    color: #333;
    font-size: 1.1em;
}
.profile-bio {
    min-height: 100px;
}
.profile-photo-preview {
    width: 80px;
    height: 80px;
    object-fit: cover;
    border-top: 2px solid #ffffff;
    border-left: 2px solid #ffffff;
    border-right: 2px solid #404040;
    border-bottom: 2px solid #404040;
}


/* === 7. Browser, Search & Breadcrumbs === */

.window-title-bar .title-button {
    display: inline-block;
    padding: 0 5px;
}
.window-title-bar .title-button img {
    width: 20px;
    height: 20px;
    vertical-align: middle;
}
.window-title-bar .title a {
    color: #ffffff;
    text-decoration: none;
}
.window-title-bar .title a:hover {
    text-decoration: underline;
}

.search-bar {
    background: #c0c0c0;
    padding: 10px;
    border-bottom: 2px solid #404040;
}
.search-bar form {
    display: flex;
}
.search-bar input[type="text"] {
    flex-grow: 1;
    margin-right: 10px;
}

.browser-container {
    display: flex;
    flex-wrap: wrap;
    align-items: flex-start;
    padding: 10px;
    background: #ffffff;
    border: 2px solid;
    border-color: #404040 #ffffff #ffffff #404040;
}
.browser-item {
    width: 100px;
    margin: 10px;
    text-align: center;
    position: relative;
}
.browser-item .icon-link {
    display: block;
    padding: 5px;
    text-decoration: none;
    color: #000;
}
.browser-item .icon-link:hover {
    background: #e0e0e0;
}
.browser-icon {
    width: 64px;
    height: 64px;
    display: block;
    margin: 0 auto 5px auto;
}
.feature-image-icon {
    object-fit: cover;
    border: 1px solid #404040;
}

.item-name {
    display: block;
    font-size: 12px;
    word-wrap: break-word;
    height: 40px;
    overflow: hidden;
}
.item-actions {
    margin-top: 2px;
    white-space: nowrap;
    overflow: hidden;
    height: 20px; /* Adjust height */
    line-height: 18px; /* Adjust line height */
    display: flex;
    justify-content: center;
}
.item-actions form {
     margin: 0;
     padding: 0;
     line-height: inherit;
     display: inline;
}


.admin-forms {
    background: #c0c0c0;
    padding: 10px;
    border-top: 2px solid #ffffff;
    display: flex;
    justify-content: space-around;
    align-items: center;
}
.admin-forms form {
    display: flex;
}
.admin-forms input[type="text"] {
    margin-right: 10px;
}

/* === Style for broken UUID links === */
.broken-link {
    color: #900;
    text-decoration: line-through;
    cursor: help;
}
.broken-link:hover {
    text-decoration: line-through;
}


/* === 8. Responsive Design === */
@media (max-width: 768px) {

    body {
        padding-top: 58px;
        padding-bottom: 0;
        font-size: 18px;
    }

    #launchpad {
        position: fixed;
        top: 0;
        left: 0;
        width: 100%;
        height: 58px;
        flex-direction: row;
        align-items: center;
        border: none;
        box-shadow: none;
        background-color: #c0c0c0;
        border-bottom: 2px solid #404040;
        overflow-x: auto;
        overflow-y: hidden;
        white-space: nowrap;
        box-sizing: border-box;
    }
    #launchpad-header {
        height: 100%;
        width: auto;
        border-right: 2px solid #404040;
        cursor: default;
        padding: 0 10px;
        display: flex;
        align-items: center;
        flex-shrink: 0;
        background: linear-gradient(to right, #400040, #600060);
        color: #ffffff;
    }
    #launchpad-header h3 {
        font-size: 18px;
        white-space: nowrap;
    }

    .launchpad-content {
        flex-wrap: nowrap;
        justify-content: flex-start;
        padding: 4px;
        width: auto;
    }
    .launchpad-divider {
        display: inline-block;
        height: 48px;
        width: 2px; /* Vertical on mobile */
        margin: 4px 8px;
        border-left: 1px solid #404040;
        border-right: 1px solid #ffffff;
        border-top: none;
        border-bottom: none;
    }
    .launchpad-button {
        width: 48px;
        height: 48px;
        flex-shrink: 0;
    }
    .launchpad-button img {
        width: 40px;
        height: 40px;
    }

    .window {
        width: 100%;
        margin: 0;
        border-top: 2px solid #ffffff;
        border-left: 2px solid #ffffff;
        border-right: 2px solid #404040;
        border-bottom: 2px solid #404040;
        box-shadow: 2px 2px 5px rgba(0,0,0,0.5);
        padding-bottom: 20px;
        box-sizing: border-box;
    }
    .window-content {
        padding: 10px;
         background-color: #c0c0c0;
         border: 1px solid #404040;
    }
    .page-body {
        background: #ffffff;
        border-color: #404040 #ffffff #ffffff #404040;
    }
    .browser-container {
         background: #ffffff;
         border-color: #404040 #ffffff #ffffff #404040;
    }


    .window-footer {
        position: static;
        text-align: center;
        background: #500050;
        color: #ffffff;
        border-top: 2px solid #ffffff;
    }
     .window-footer span {
          color: #ffffff;
     }

    .browser-container {
        justify-content: space-around;
    }
    .browser-item {
        width: 85px;
        margin: 5px;
    }
    .browser-icon {
        width: 50px;
        height: 50px;
    }
    .item-name {
        height: 30px;
    }
    /* Small buttons on mobile */
    .item-actions {
        display: flex;
        flex-direction: row; /* Side-by-side */
        justify-content: center;
        height: auto;
        line-height: normal;
        margin-top: 5px;
    }
    .item-actions .edit-button-small,
    .item-actions .inline-form {
        margin: 0 1px; /* Minimal margin */
        width: auto;
    }
     .edit-button-small,
     .delete-button-small {
          padding: 2px 5px; /* Slightly larger padding for touch */
          font-size: 13px; /* Slightly larger font */
     }

    .admin-forms {
        flex-direction: column;
        align-items: stretch;
    }
    .admin-forms form {
        flex-direction: column;
        margin-bottom: 10px;
    }
    .admin-forms input[type="text"] {
        margin-right: 0;
        margin-bottom: 10px;
    }
    .admin-forms button, .admin-forms a button {
        width: 100%;
        box-sizing: border-box;
    }

    .profile-header {
        text-align: center;
    }
    .profile-photo {
        float: none;
        display: block;
        margin: 0 auto 15px auto;
    }

    .window-content input[type="text"],
    .window-content textarea {
        width: 95% !important;
        box-sizing: border-box;
    }
    .window-content input[type="file"] {
        width: 95%;
    }

    .search-bar form {
        flex-direction: column;
    }
    .search-bar input[type="text"] {
        margin-right: 0;
        margin-bottom: 10px;
        box-sizing: border-box;
    }
}
