.item {
    display: flex;
    flex-direction: column;
    gap: 0.5em;

    margin-bottom: 1em;
}

.actions {
    display: flex;
    gap: 1em;
    align-items: center;
    justify-content: end;

    margin-top: 1em;
}

.subscription-details {
    width: 100%;
    max-width: 300px;

    border-radius: 1em;

    background-color: white;
    box-shadow: 0 5px 10px 5px rgba(0, 0, 0, 0.25);

    padding: 1em;
    box-sizing: border-box;
}

.subscription-details .name {
    font-family: var(--font-heading);
    font-weight: bold;
    font-size: 1.5em;

    color: var(--secondary);

    margin: 0;
    margin-bottom: 1em;
}

.subscription-details .actions {
    justify-content: flex-end;
}

/* Modules */
.module {
    background-color: whitesmoke;
    border: 1px solid lightslategray;
    border-radius: 5px;

    padding: 5px;
    
    display: flex;
    align-items: center;
    gap: 10px;

    width: 100%;
    max-width: 300px;
    box-sizing: border-box;

    color: black;
    text-decoration: none;
}

.module p {
    margin: 0;
}

.module[complete=""] {
    border: 1px solid transparent;
    background-color: transparent;

    color: green;
    font-weight: bold;
    text-decoration: line-through;
}

.module[complete=""] img {
    content: url(/assets/images/icons/bookmark-check.svg);
}

.module[selected=""] {
    border: 1px solid var(--primary-dark);
    background-color: var(--primary-bright);

    font-weight: bold;
    color: white;
}

.module[selected=""] img {
    filter: invert(1);
}

.module[add=""] {
    border: 1px solid transparent;
    background-color: transparent;

    color: var(--primary);
    font-weight: bold;
}

.module[add=""] img {
    content: url(/assets/images/icons/bookmark_add.svg);
}

.module:hover {
    background-color: var(--secondary-bright);
    border: 1px solid var(--secondary);

    color: black;
}

.module:hover img {
    filter: invert(0);
}

/* Module information */
.heading {
    display: flex;
    gap: 1em;
    align-items: center;
    justify-content: center;
}

.heading .rule {
    flex-grow: 1;
    height: 1px;
    background-color: gainsboro;
}

.heading h1 {
    margin: 0;
}

/* Module files */
.file-list {
    display: flex;
    flex-direction: column;

    gap: 1em;
}

.file-list .file {
    display: flex;
    justify-content: flex-start;
    flex-direction: column;

    border-radius: 1em;
    padding: 1em;
    padding-left: calc(1em + 24px + 10px);

    box-shadow: 0 3px 5px 2px rgba(0, 0, 0, 0.35);
    
    background-image: url(/assets/images/icons/link.svg);
    background-position-y: center;
    background-position-x: 1em;
    background-repeat: no-repeat;
    
    text-decoration: none;

    /* transition: none; */
}

.file-list .file .file-name {
    color: var(--primary);
    font-weight: bold;
}

.file-list .file .file-url {
    color: gray;

    font-size: 0.75em;
    font-style: italic;
}


.file-list .file p {
    margin: 0;
}

.file-list .file:hover {
    background-color: var(--secondary-bright);
}

.file-list .file:hover p {
    text-decoration: underline;
}

/* File: crud */
.file.file-crud {
    background-image: none;
    padding: 1em;
    flex-direction: row;
    gap: 1em;
    align-items: center;

    transition: background-color 0.2s;
}

.file.file-crud:hover {
    background-color: inherit;
}

.file.file-crud .delete-button {
    height: 24px;
    cursor: pointer;
    transition: filter 0.2s;
}

.file.file-crud .delete-button:hover {
    filter: brightness(0) invert(1);
}

.file.file-crud:has(.delete-button:hover) {
    background-color: #b93333;
    text-decoration: line-through;
}

.file.file-crud .details {
    display: flex;
    flex-direction: column;
    gap: 10px;

    width: 100%;
}

.file.file-crud .text-field {
    width: 100%;
    box-sizing: border-box;
    
    padding: 5px;
}

.file.file-crud .text-field.small {
    font-size: .8em;
    padding: 3px;
}

/* Module */
.module-actions {
    flex-direction: row;
    justify-content: flex-end;
}

.side-view {
    display: flex;
    flex-direction: row;
    justify-content: space-between;
    gap: 2em;
}

.content {
    flex-grow: 1;
}

.modules {
    min-width: 300px;
}

.side-image {
    background-color: var(--primary);
    height: 100%;
    width: 50%;
}

.side-image img {
    object-fit: cover;
    height: 100%;
    width: 100%;
    object-position: 75% 50%;
}

@media screen and (max-width: 750px) {
    .side-view {
        flex-direction: column;
    }

    .modules {
        width: 100%;
    }

    .modules .module {
        width: 100%;
        max-width: none;
    }

    .side-image {
        display: none;
    }
}

/* Form */
.field {
    display: flex;
    flex-direction: column;
    gap: 10px;

    margin: 1em 0;
    margin-bottom: 2em;
}

.field .description {
    margin: 0;
    font-size: 0.9em;
    font-style: italic;
}