/* =========================================================
   PERSONAL LIBRARY
   Book Form Styles
   ========================================================= */


/* =========================================================
   1. FORM CARD
   ========================================================= */

.book-form-card {

    width: 100%;

    max-width: none;

    padding: 26px;

    background-color: var(--white);

    border: 1px solid var(--border-color);

    border-radius: var(--radius-md);

    box-shadow: var(--shadow-sm);

}


/* =========================================================
   2. FORM SECTION
   ========================================================= */

.form-section {

    margin-bottom: 32px;

}


.form-section:last-child {

    margin-bottom: 0;

}


.form-section-title {

    margin: 0 0 6px;

    color: var(--black);

    font-size: 17px;

    font-weight: 700;

}


.form-section-subtitle {

    margin: 0 0 21px;

    color: var(--gray-500);

    font-size: 13px;

    line-height: 1.6;

}


/* =========================================================
   3. FORM FIELDS
   ========================================================= */

.form-label {

    margin-bottom: 8px;

    color: var(--black);

    font-size: 13px;

    font-weight: 600;

}


.form-control {

    min-height: 44px;

    padding: 9px 13px;

    color: var(--black);

    background-color: var(--white);

    border-color: var(--gray-300);

    border-radius: var(--radius-sm);

    font-size: 13px;

}


.form-control:focus {

    color: var(--black);

    background-color: var(--white);

    border-color: var(--black);

    box-shadow:
        0 0 0 2px
        rgba(17, 17, 17, 0.08);

}


textarea.form-control {

    min-height: 140px;

    resize: vertical;

}


.form-text {

    margin-top: 7px;

    color: var(--gray-500);

    font-size: 11px;

}


/* =========================================================
   4. GENRES
   ========================================================= */

.genre-list {

    display: flex;

    flex-wrap: wrap;

    align-items: center;

    gap: 7px;

}


.genre-item {

    display: inline-flex;

    align-items: center;

    gap: 7px;

    min-height: 32px;

    padding: 5px 10px;

    color: var(--gray-900);

    background-color: var(--gray-100);

    border: 1px solid var(--gray-200);

    border-radius: 999px;

    font-size: 12px;

    font-weight: 600;

}


.genre-remove-button {

    width: 18px;

    height: 18px;

    display: inline-flex;

    align-items: center;

    justify-content: center;

    padding: 0;

    color: var(--gray-500);

    background: none;

    border: none;

    font-size: 10px;

    transition: color 0.2s ease;

}


.genre-remove-button:hover {

    color: var(--black);

}


.genre-input-wrapper {

    display: inline-flex;

    align-items: center;

    gap: 7px;

}


.genre-input {

    width: 140px;

    min-height: 32px;

    padding: 5px 10px;

    font-size: 12px;

    border-radius: 999px;

}


.add-genre-button {

    display: inline-flex;

    align-items: center;

    gap: 6px;

    min-height: 32px;

    padding: 5px 10px;

    color: var(--gray-700);

    background-color: var(--white);

    border: 1px dashed var(--gray-300);

    border-radius: 999px;

    font-size: 12px;

    font-weight: 600;

    transition:
        background-color 0.2s ease,
        border-color 0.2s ease,
        color 0.2s ease;

}


.add-genre-button:hover {

    color: var(--black);

    background-color: var(--gray-100);

    border-color: var(--gray-400);

}


.add-genre-button i {

    font-size: 11px;

}


/* =========================================================
   5. TRANSLATORS
   ========================================================= */

.translator-list {

    display: flex;

    flex-direction: column;

    gap: 9px;

}


.translator-row {

    display: flex;

    align-items: center;

    gap: 9px;

}


.translator-row .form-control {

    flex: 1;

}


.remove-translator-button {

    width: 44px;

    height: 44px;

    flex: 0 0 44px;

    display: inline-flex;

    align-items: center;

    justify-content: center;

    padding: 0;

    color: var(--gray-700);

    background-color: var(--white);

    border: 1px solid var(--gray-300);

    border-radius: var(--radius-sm);

    font-size: 15px;

    transition:
        background-color 0.2s ease,
        border-color 0.2s ease,
        color 0.2s ease;

}


.remove-translator-button:hover {

    color: var(--white);

    background-color: var(--black);

    border-color: var(--black);

}


.add-translator-button {

    display: inline-flex;

    align-items: center;

    gap: 7px;

    margin-top: 10px;

    padding: 0;

    color: var(--gray-700);

    background: none;

    border: none;

    font-size: 12px;

    font-weight: 600;

    transition: color 0.2s ease;

}


.add-translator-button:hover {

    color: var(--black);

}


.add-translator-button i {

    font-size: 14px;

}


/* =========================================================
   6. COVER
   ========================================================= */

.cover-upload-wrapper {

    display: flex;

    align-items: flex-start;

    gap: 22px;

}


.cover-preview {

    width: 105px;

    height: 147px;

    flex: 0 0 105px;

    overflow: hidden;

    display: flex;

    align-items: center;

    justify-content: center;

    background-color: var(--gray-100);

    border: 1px solid var(--border-color);

    border-radius: 8px;

    color: var(--gray-400);

    font-size: 31px;

}


.cover-preview img {

    width: 100%;

    height: 100%;

    object-fit: cover;

}


.cover-upload-content {

    flex: 1;

}


.cover-upload-content .form-text {

    max-width: 400px;

}


/* =========================================================
   7. FORM ACTIONS
   ========================================================= */

.form-actions {

    display: flex;

    align-items: center;

    justify-content: flex-end;

    gap: 9px;

    padding-top: 23px;

    border-top: 1px solid var(--border-color);

}


.form-actions .btn {

    min-height: 40px;

    padding: 8px 16px;

    border-radius: var(--radius-sm);

    font-size: 13px;

    font-weight: 600;

}


.form-actions .btn i {

    font-size: 14px;

}


/* =========================================================
   8. RESPONSIVE
   ========================================================= */

@media (max-width: 576px) {

    .book-form-card {

        padding: 20px;

    }


    .form-section-title {

        font-size: 16px;

    }


    .form-section-subtitle {

        font-size: 12px;

    }


    .form-label {

        font-size: 13px;

    }


    .form-control {

        font-size: 13px;

    }


    .cover-upload-wrapper {

        flex-direction: column;

    }


    .cover-preview {

        width: 105px;

        height: 147px;

        margin: 0 auto;

    }


    .cover-upload-content {

        width: 100%;

    }


    .form-actions {

        flex-direction: column-reverse;

        align-items: stretch;

    }


    .form-actions .btn {

        width: 100%;

    }

}