/* ============================================
   FOLDER ICONS - Grid layout inside windows
============================================ */

.folder-icons {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    column-gap: 16px;
    row-gap: 80px;
    padding: 24px;
    flex: 1;
    min-height: 300px;
    align-content: center;
}

.folder-icon {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 12px;
    background: transparent;
    border: none;
    cursor: pointer;
    text-decoration: none;
    justify-self: center;
}

.folder-icon:focus {
    outline: none;
}

.folder-icon__image {
    width: 64px;
    height: 64px;
    margin-bottom: 8px;
    background-size: contain;
    background-repeat: no-repeat;
    background-position: center;
    /* Smooth scale transition for click feedback */
    transition: transform 0.12s cubic-bezier(0.34, 1.56, 0.64, 1);
}

/* Bounce effect on hover */
.folder-icon:hover .folder-icon__image {
    transform: scale(0.92);
}

/* Extra squeeze on click */
.folder-icon:active .folder-icon__image {
    transform: scale(0.85);
}

.folder-icon__label {
    font-family: 'Silkscreen', 'Chicago', monospace;
    font-size: 14px;
    font-weight: 400;
    text-align: center;
    padding: 6px 10px;
    max-width: 140px;
    line-height: 1.4;
    color: var(--pure-black);
    word-wrap: break-word;
    letter-spacing: 0px;
    /* Smooth color transition for selection */
    transition: background-color 0.1s ease-out, color 0.1s ease-out;
}

/* INVERTED SELECTION - Icon labels on hover */
.folder-icon:hover .folder-icon__label {
    background: var(--pure-black);
    color: var(--pure-white);
}

/* Folder window header bar with item count */
.folder-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 8px 16px;
    border-bottom: 1px solid var(--pure-black);
    font-family: 'Silkscreen', 'Chicago', monospace;
    font-size: 12px;
    font-weight: 400;
    background: var(--pure-white);
}

.folder-header__items {
    color: var(--pure-black);
}

.folder-header__size {
    color: var(--pure-black);
}

/* ============================================
   ICONS - System 7-inspired pixel art (32x32)
============================================ */

.icon-person { background-image: url("../assets/icons/folder-person.svg"); }
.icon-briefcase { background-image: url("../assets/icons/folder-briefcase.svg"); }
.icon-music { background-image: url("../assets/icons/folder-music.svg"); }
.icon-palette { background-image: url("../assets/icons/folder-palette.svg"); }
.icon-document { background-image: url("../assets/icons/document.svg"); }
.icon-github { background-image: url("../assets/icons/github.svg"); }
.icon-linkedin { background-image: url("../assets/icons/linkedin.svg"); }
.icon-mail { background-image: url("../assets/icons/mail.svg"); }
.icon-smiley { background-image: url("../assets/icons/smiley.svg"); }

/* ============================================
   DESKTOP ICON - Main desktop icon (Alex)
============================================ */

.desktop-icon {
    position: fixed;
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 8px;
    background: transparent;
    border: none;
    cursor: pointer;
}

.desktop-icon:focus {
    outline: none;
}

.desktop-icon__image {
    width: 64px;
    height: 64px;
    margin-bottom: 6px;
    background-size: contain;
    background-repeat: no-repeat;
    background-position: center;
    transition: transform 0.12s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.desktop-icon:hover .desktop-icon__image {
    transform: scale(0.92);
}

.desktop-icon:active .desktop-icon__image {
    transform: scale(0.85);
}

.desktop-icon__label {
    font-family: 'Silkscreen', 'Chicago', monospace;
    font-size: 14px;
    font-weight: 400;
    text-align: center;
    padding: 4px 8px;
    color: var(--pure-black);
    transition: background-color 0.1s ease-out, color 0.1s ease-out;
}

.desktop-icon:hover .desktop-icon__label {
    background: var(--pure-black);
    color: var(--pure-white);
}

/* ============================================
   ICON DRAG STATES
============================================ */

/* Dragging state for all icons */
.desktop-icon.is-dragging,
.folder-icon.is-dragging {
    cursor: grabbing;
    z-index: 1000;
    user-select: none;
}

.desktop-icon.is-dragging *,
.folder-icon.is-dragging * {
    pointer-events: none;
}

/* Folder icons that have been dragged get absolute positioning */
.folder-icon--positioned {
    position: absolute;
}

/* Ensure folder-icons container can hold absolutely positioned items */
.folder-icons {
    position: relative;
}
