/* ====== MODAL BASE STYLES ====== */
.modal {
    display: none;
    position: fixed;
    align-items: center;
    justify-content: center;
    z-index: 10;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(5px);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.modal-content {
    position: relative;
    color: var(--text-primary);
    background-color: var(--bg-secondary);
    width: 90%;
    max-width: 500px;
    border-radius: 12px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.2);
    transform: scale(0.8);
    transition: transform 0.3s ease-in-out, transform 0.3s ease-in-out;
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 20px;
    gap: 10px;
    border-bottom: 1px solid var(--border-color);
}

.modal-header h2 {
    margin: 0;
    font-size: 18px;
    user-select: none;
}

.close-modal {
    font-size: 24px;
    user-select: none;
}

.modal-body {
    padding: 20px;
    padding-top: 0;
}

/* ====== MODAL CONTENT STYLES ====== */
#package-list-input {
    width: 100%;
    min-height: 150px;
    padding: 12px;
    color: var(--text-primary);
    background-color: var(--bg-input);
    border-radius: 8px;
    border: 1px solid var(--border-color);
    box-sizing: border-box;
    outline-color: var(--btn-primary);
    font-family: monospace;
    resize: none;
}

.modal-actions {
    margin-top: 10px;
    display: flex;
    gap: 10px;
}

.modal-btn {
    width: 100%;
    padding: 10px;
    border-radius: 8px;
    font-size: 18px;
    font-weight: bold;
    border: none;
    background-color: var(--border-color);
    color: var(--text-primary);
    user-select: none;
}

.confirm-btn {
    background-color: var(--btn-primary);
    color:var(--btn-primary-text);
}

/* ====== APP INFO MODAL STYLES ====== */
.app-info-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 10px 0;
}

.app-info-detail {
    width: 100%;
    margin-bottom: 10px;
}

.app-info-detail strong {
    user-select: none;
}

.app-info-detail-text {
    width: fit-content;
    border-radius: 5px;
    margin: 0;
    text-align: left;
    word-break: break-word;
    word-break: break-all;
    background-color: var(--bg-secondary);
    user-select: none;
    display: flex;
    align-items: flex-start;
    gap: 8px;
    flex-wrap: wrap;
}

/* ====== CONFIRMATION MODAL STYLES ====== */
.warning-text {
    color: var(--btn-warning);
    font-weight: bold;
    margin-bottom: 16px;
}

.selected-apps-list {
    max-height: 150px;
    overflow: auto;
    margin-bottom: 16px;
    padding: 10px;
    background-color: var(--border-color);
    border-radius: 4px;
}

.selected-apps-list p {
    margin-top: 5px;
    margin-bottom: 0;
}

.selected-apps-list ul {
    margin: 5px 0;
    padding: 0 20px;
}

.selected-apps-list li {
    margin-bottom: 4px;
    font-size: 14px;
    white-space: nowrap;
}

/* ====== IMPORT MODAL STYLES ====== */
.file-import-option {
    margin: 10px 0;
    display: flex;
}

#file-import-btn {
    flex-grow: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
}